Zettelkästen

Getting started

There are various index notes to get started.

Navigation

Run gf or gF (same window) to visit these directories. See https://vim.fandom.com/wiki/Open_file_under_cursor

Use the jumplist for quick back-and-forth navigation: and . Works both within and between files. See :help jumplist

Make a mapping to your index file, e.g.:

nnoremap <Leader>ww :e C:/Users/Edwin\ Wenink/Documents/Notes/index.md<cr>

You can also navigate buffers (alternative mappings from vimunimpaired)

  • :bprevious or [b
  • :bnext or ]b
  • :bd for deleting buffers from the buffer list ls

Go to next or previous file in directory:

  • [f
  • ]f

Searching Notes

Vimgrep is a cross platform option, but very slow. Results populate the quickfix list.

I wrote my own "Notes grep" ( \n ) that uses ripgrep behind the scenes. It also populates the quickfix list.

Navigate quickfix list:

  • :copen and :cclose for opening the list
  • :cnext and :cprev for jumping to next/previous list item
  • :cdo {cmd} to run cmd on every list item
  • :cc to echo the current item
  • :cc {nr}: to jump to item number and echo it
  • :colder and :cnewer to also navigate older quickfix lists.
  • :cfirst and [Q
  • :clast and ]Q

The unimpaired plugin provides default mappings for the quickfix list:

  • ]q for :cnext
  • [q for :cprev

Good refs: https://www.reddit.com/r/vim/comments/5oqu9t/best_way_to_search_all_files_in_current_directory/

Links for inspiration

https://joereynoldsaudio.com/2018/07/07/you-dont-need-vimwiki.html

https://dev.to/konstantin/taking-notes-in-vim-revisited-558k.html

TODO: https://github.com/jkramer/vim-checkbox