Vim is a great platform for taking notes. However, some constraints are necessary to maximize efficiency for real-time thought-capture.
This note is a work in progress. It may be out-of-date or have incomplete information.
I have a file type plugin at~/.vim/ftplugin/markdown.vim. There are
several settings in that file that improve my workflow specifically for
taking markdown notes.
Markdown is the de facto standard for note-taking, it lacks a single
definitive spec. Since Pandoc is the best tool for Markdown conversion,
I will be following the
Pandoc Markdown
spec. If a fallback is required for further clarity, I will use
Github Flavored Markdown.
Since I spend a lot of time in the Vim help docs, I have decided to use
Vim’s notation for keystrokes and special characters. In practice, this
means I am representing keystrokes using markdown inline code segments
instead of the HTML <kbd> tag. For more information about Vim’s
notation syntax, see :help notation.
The zettelkasten method prefers curated entry points to notes over
content searches. In the spirit of this convention, I have elected to
forgo querying by tags. Navigation will be handled entirely by links.
This has the added benefit of being fully supported by base Markdown
syntax.
I am building my notes using Pandoc via a makefile. Currently, I am only
using one non-default Pandoc extension:
wikilinks_title_after_pipe.
Wikilinks are simpler to write. I tried working with plain markdown
links, but they interrupted my flow-state.
Vim supports writing your own custom help docs in the VIMDOC format. With some simple configuration, these can be accessed in exactly the same way as the built-in Vim help.
Custom help docs should be added to ~/.vim/doc/.
In order for Vim to read the help files, VIMDOCs begin and end with special lines which contain metadata. The file must begin with a title line in the below format,[fn:1] and end with a modeline.[fn:2]
*filetitle.txt* {short description of the plugin}" USING VIM HELP DOCS FOR NOTES
" enables modelines in custom help files
" (This is overriding the default macOS config at /usr/share/vim/vimrc)
set modelines=1l
" regenerate help tags for personal notes on file save
autocmd BufWritePost ~/.vim/doc/* :helptags ~/.vim/doc*n-template.txt* Aliases: *n-tmp* Created: YYYY-MM-DD
your text here
vim:tw=78:ts=8:noet:ft=help:norl:modifiable:noreadonly:<C-V> and then <Tab>. Also,
the to do title must begin with a lower case letter.
*Todo your to do (starting with a lower case letter)- Excellent internal link navigation
- Automatic not creation from links
- Automatic global link updates upon file rename
Eventually, I managed to simplify my strategy sufficiently that the efficiency gains were marginal.
While using Vimwiki, I published my notes with MDwiki.[fn:1] :help help-writing
[fn:2] :help modeline