Take Notes in VIM

Posted on Jan 28, 2022

There are a lot of programs to take notes on, however, if you use VIM, why not take notes on your own text editor?

Install a plugin manager

Make sure you have some type of VIM plugin manager installed. Personally, I use ´vim-plug´.

Install ´vim-plug´ for VIM, on Unix based systems:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Documentation is available at: https://github.com/junegunn/vim-plug

Install vimwiki

Edit ´~/.vimrc´ to configure VIM and make it use vimwiki:

call plug#begin()

Plug 'vimwiki/vimwiki'

call plug#end()

Documentation is available at: https://github.com/vimwiki/vimwiki

Configure vimwiki

Now, we will configure vimwiki to use Markdown syntax and save the notes on a custom path. Once again, edit ´~/.vimrc´:

let g:vimwiki_list = [{'path': '~/Documents/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]

Using vimwiki

All that is left is to actually use it! Open VIM and then type: \ww

This will open ´index.md´, some sort of homepage where you can put your topics and organize them however you like.

To create a note of some topic, press ´Enter´ with the cursor on top of the subject. This will create a link to a file. Pressing ´Enter´ again will move you to that file where you can write all your notes. When you are done with that particular file, press ´Return´ and you will be moved back to ´index.md´.

After a while, this workflow starts to be extremely productive because you never have to leave the text editor and can easily move between the topics you have created.