Vim plugin to help edit Obsidian notes in Vim. Links, backlink resolution and jumps, search and completion and highlighting. Even if you don't use Obsidian, you can use it to manage your notes locally.
This plugin was made for me, but I hope it will be useful for those who want to easily edit Obsidian notes with vim as I do. If you have trouble using it, please post an issues below. Contributions, edits and distribution are also welcome.
In my earlier days, I used to divide notes in directories and manage note relationships by describing relative paths. However, I had trouble categorizing notes and spent a lot of time resolving note paths. I needed to achieve the following.
- Hierarchical structure is not suitable for classification of detailed personal knowledge.
- Create atomic notes and link notes to each other.
- Eliminate stress by unifying editing tasks and management of editing plugins in Vim.
- [[Link]] format to integrate into Obsidian.
For me, vimsidian is the plugin that solves these issues and complements my PKM (personal knowledge managment).
- Insert mode completion of note names.
- Find and move the link under the cursor.
- Go to link before or afater current cursor.
- Create a note with the name of the link under the cursor.
- Search for notes and lines matching keywords.
- Display notes in the quickfix window containing the tag string under the cursor.
- Highlighting broken links.
- Fewer dependencies.
- kis9a/vimsidian-daily-notes: Daily note extension for vimsidian
- kis9a/vimsidian-link-stack: Keep a link stack of jumping history in each window
- vimsidian-formatting-of-link-spacing-example.md · GitHub
Use your favorite plugin manager.
- Example: vim-plug
Plug 'kis9a/vimsidian'- make
.obsidianfile or directory in your obsidian vault directory.
If the current working directory contains a .obsidian file or directory, it will be recognized as an Obsidian vault.
- configure mappings
~/.vim/ftplugin/vimsidian.vim
if exists("b:loaded_vimsidian_ftplugin_mappings")
finish
endif
let b:loaded_vimsidian_ftplugin_mappings = 1
nnoremap <silent> <buffer> <C-k> :VimsidianJump<CR>
nnoremap <silent> <buffer> <2-LeftMouse> :VimsidianJump<CR>
nnoremap <silent> <buffer> sk :VimsidianPrevLink<CR>
nnoremap <silent> <buffer> sj :VimsidianNextLink<CR>
nnoremap <silent> <buffer> sl :VimsidianFindLinks<CR>
nnoremap <silent> <buffer> sg :VimsidianFindBacklinks<CR>
nnoremap <silent> <buffer> st :VimsidianFindTags<CR>
nnoremap <silent> <buffer> sN :VimsidianSearchNotes<Space>
nnoremap <silent> <buffer> sL :VimsidianSearchLinks<Space>
autocmd WinEnter,BufEnter <buffer> silent! VimsidianMatchBrokenLinks
autocmd CursorMoved <buffer> silent! VimsidianMatchCursorLinkUse fzf to list note names
Open listings using fzf instead of quick fix window. See fzf installation at https://github.com/junegunn/fzf.vim#installation
# e.g
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
if executable('fzf')
let g:vimsidian_use_fzf = 1
endifSee Vim doc - Syntax highlight, Variables and Commands help
:h vimsidianIf you contribute to this repository, please use the following tools for linting and testing
Use vim-parser, vim-vimlint
make init
make lint
When using vint
make vint-int
make lint-vint
Use vim-themis, CI .github/workflows/test.yml
make init
make test