This is a Vim and neovim plugin for writing and maintaining a personal wiki. The plugin was initially based on vimwiki, but it is written mostly from scratch and is based on a more “do one thing and do it well” philosophy.
This README file contains basic information on how to get started, as well as
a list of available features. For more details, please read the
full documentation (:help wiki.vim if the plugin
is installed).
Note
wiki.vimis not a filetype plugin. It is designed to be used with filetype plugins, e.g. dedicated Markdown plugins. Users are advised to read:help wiki-intro-pluginsfor a list of plugins that work well withwiki.vim.
Warning
wiki.vimrequires Vim 9.1 or Neovim 0.10!
There are a lot of methods for installing plugins. The following explains the most common and popular approaches.
To install wiki.vim, add a plugin spec similar to this:
{
"lervag/wiki.vim",
-- tag = "v0.10", -- uncomment to pin to a specific release
init = function()
-- wiki.vim configuration goes here, e.g.
end
}
wiki.vim is mostly implemented in Vimscript and is configured with the
classical vimscript variable convention like g:wiki_OPTION_NAME. Nowadays,
Neovim is often configured with Lua, thus some users may be interested in
reading :help lua-vimscript.
If you use vim-plug, then add one of
the following lines to your configuration. The first will use the latest
versions from the master branch, whereas the second will pin to a release
tag.
Plug 'lervag/wiki.vim'
Plug 'lervag/wiki.vim', { 'tag': 'v0.10' }
There are many other plugin managers out there. They are typically well documented, and it should be straightforward to extrapolate the above snippets.
This outlines the basic steps to get started:
Create a wiki directory where the wiki files should be stored, for instance
~/wiki.
Add the following to your vimrc file:
let g:wiki_root = '~/wiki'
Now you can open the index file with <leader>ww and start to add your notes
as desired.
Please also read the Guide section in the documentation.
g:wiki_root)WikiIndex to open the indexWikiJournal to open the journalWikiPages to select from list of all pagesWikiTags to select from list of tagsWikiToc)WikiTocGenerate)WikiLinkIncomingToggle)iu au Link URLit at Link text<c-p> and <c-n>:WikiExport command for exporting to e.g. pdf with pandocWithout vimwiki, this plugin would never
have existed. So my thanks go to the smart people that developed and maintains
vimwiki, both for the inspiration and for the ideas.
Feel free to consider any of the many available alternatives. There are likely many more, but these are the ones I’m aware of: