For some time I've been searching for a plugin that would allow me to take notes without any hassle. I enjoy using markdown, so naturally this plugin had to support that format.
Recently I came across vimwiki. It has almost everything that I wanted, although there are a couple of flaws. But since it's vim it is very easy to fix them yourself.
Installing vimwiki
If you're using vim-plug, you can install it simply by adding following in your ~/.vimrc file:
This will tell the plugin that all notes must be stored in ~/Documents/notes/, which is compatible with most OS and you will profit automatically of iCloud sync in MacOS. It also tells that we are using markdown format by default and our default root note will be called index.md. To access this note you need to hit Leader + w + w from any vim buffer.
After you've opened any note you can hit Enter on any word or selection and vimwiki will create a link to a child note(with that word or selection as a name) and the note file itself. Once the link is created you can simply navigate to a child note by hitting Enter once again. Magic!
The flaws and how to fix them
The main flaw is that vimwiki replaces itself as syntax highlighter for markdown files. Compare: vimwiki highlight
to vim-markdown highlight
I know that it depends on colorscheme, but I saw same result on multiple variants.
The second flaw is it changes filetype to vimwiki so that you lose all your snippets and other good stuff that was linked to markdown filetype.
To fix both you need to add following line to ~/.vimrc:
autocmd FileType vimwiki setft=markdown
That way we reset the vimwiki file type to markdown, all the magic functionality that I talked about earlier will remain.
You can find all the configuration in my vim settings repo: