wikivim

Configuration

Here there are many options that overlap with Vimwiki:

  • g:wiki_root: specify root path of wiki files

  • g:wiki_filetypes: specify list of filetypes to enable the wiki with

  • g:wiki_map_link_target: specify a transformation to file names when creating a file. This is useful, but a lot of my filename creation happens outside of any wiki plugin.

  • g:wiki_link_target_type: choose link style (I’ve set this to md)

  • Wiki journal defaults:

    let g:wiki_journal = {
        \ 'name': 'journal',
        \ 'frequency': 'daily',
        \ 'date_format': {
        \   'daily' : '%Y-%m-%d',
        \   'weekly' : '%Y_w%V',
        \   'monthly' : '%Y_m%m',
        \ },
        \}
  • g:wiki_file_open: specify a function for opening file URLs, namely to handle certain file types with specific applications. I’ve had to specify PDF programs as the default xdg-open option hasn’t been working for me.

Default Mappings

  • n ww |(wiki-index)| [GLOBAL]
  • n wn |(wiki-open)| [GLOBAL]
  • n ww |(wiki-journal)| [GLOBAL]
  • n wx |(wiki-reload)| [GLOBAL]
  • n wc |(wiki-code-run)|
  • n wb |(wiki-graph-find-backlinks)|
  • n wg |(wiki-graph-in)|
  • n wG |(wiki-graph-out)|
  • n wf |(wiki-link-toggle)|
  • n wd |(wiki-page-delete)|
  • n wr |(wiki-page-rename)|
  • n wt |(wiki-page-toc)|
  • n wT |(wiki-page-toc-local)|
  • n wp |(wiki-export)|
  • x wp |(wiki-export)|
  • n wlu |(wiki-list-uniq)|
  • n wlU |(wiki-list-uniq-local)|
  • n wsl |(wiki-tag-list)|
  • n wsr |(wiki-tag-reload)|
  • n wss |(wiki-tag-search)|
  • n |(wiki-link-next)|
  • n |(wiki-link-open)|
  • n |(wiki-link-open-split)|
  • n |(wiki-link-prev)|
  • n |(wiki-link-return)|
  • n gl |(wiki-link-toggle-operator)|
  • ni |(wiki-list-toggle)|
  • x |(wiki-link-toggle-visual)|
  • ox au |(wiki-au)|
  • ox iu |(wiki-iu)|
  • ox at |(wiki-at)|
  • ox it |(wiki-it)|
  • ox al |(wiki-al)|
  • ox il |(wiki-il)|

Commands

Many commands also overlap with Vimwiki, including opening files, going to the wiki index, and going to a journal entry. New ones include

  • WikiGraphFindBacklinks: list backlinks in a location list
  • WikiGraphIn/WikiGraphOut: show link graph in/out of the current page

There are also similar navigation commands between pages (by default to move to next link, to move back, to back a page, etc). Additionally, there are the same WikiRename and WikiDelete commands. There are also some interesting looking journal commands:

  • WikiJournalToWeek: go to weekly summary, parsing day entries if non-existent
  • WikiJournalToMonth: go to monthly summary, parsing day and week entries if non-existent

So there appears to be a way to create week and month level journal entires, which is great.

Tags

Like Vimwiki, tags can be specified in the first 15 lines of a file with :tag1:tag2:tag3:. I don’t intend to use this as I’d prefer to just link files, but this will require resolving in some way with downstream HTML rendering. Additionally, there is built-in tag search support with fzf.

Anchors

Anchors are supported by default within wiki links. For example, the following link will take me back to the configuration part of this document: config. This is very handy, and can also be seen with TOC generated in-file with the WikiPageToc command.