[ code. keyboards. terminals. cyber. ]



Sometimes you learn to love old tools and plugins only after a long time.
That's how I felt about vimwiki.

Somehow I need yet again and again the same info in everyday life. Be it when coding, tinkering, podcasting and and and.
What offers itself there is an own Knowledgebase (which can be easily expanded and edited).
So quasi a Wiki around the own thought bits to sorti and that best for the Commandline ... This is where vimwiki comes into play.

vimwiki builds its own small local wiki that can be styled with Markdown in Vim and allows linking within documents.
So everything needed to organize your own thoughts.


Now how does vimwiki get into Vim.
vimwiki runs in every Vim from version 7.3

Beforehand, the following entries should be made or present in the "vimrc":

set nocompatible
filetype plugin on
syntax on

Now you can install vimwiki

Vim packages
git clone ~/.vim/pack/plugins/start/vimwiki

cd ~/.vim
mkdir bundle
cd bundle
git clone

Vim Plug
Plug 'vimwiki/vimwiki'

After this, vimwiki is ready to use.
vimwiki can basically be formatted using three different syntax: vimwiki (default), Markdown and MediaWiki.
The syntax that vimwiki should use can also be defined in the ".vimrc".

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

In principle, it is also recommended to install the helpfiles for vimwiki.

vim -c 'helptags ~/.vim/pack/plugins/start/vimwiki/doc' -c quit

Once that's done - you're good to go.


As Vim already does, vimwiki is controlled purely by keyboard and keybindings.
The following keybindings help to control it ([LEADER] is in the default config of Vim \, if you mapped the LEADER differently you have to take that of course):

[LEADER] ww -- open wiki index file
[LEADER] wt -- open die index file in new tab
[LEADER] ws -- open selected index file
[LEADER] wd -- delete wikifile
[LEADER] wr -- rename wikifile

[ENTER] -- follow / create Link

With this, vimwiki can now be operated.
Now we can install vimwiki, basically configure it and also operate it.
But now there is no content yet. Before the knowledgebase is filled, considerations about the structure must be made, this saves a lot of rework.
If the rough structure stands, the index file can be created.
The vimwiki own syntax is relatively simple and not entirely dissimilar to Markdown.

vimwiki syntax

The following tags can be used to style the index file and individual vimwiki pages:

= H1 =
== H2 ==
=== H3 ===

*bold* (bold)
_italic_ (italic)

[[Link]] (Simple internal link)
[[Link|Description]] (Simple internal link | display name in wikifile)

* List Pos 1
* List Pos 2

- List Pos 1
- List Pos 2

1st list Pos 1
2. list pos 2

For all usable syntax tags, you can always use the internal help:

:h vimwiki-syntax

Another function is to export the wikifiles to HTML.
To do this, there are the following commands that can be used in Vim:

:vimwiki2HTML (exports the current file as HTML)
:vimwikiAll2HTML (exports all file as HTML)

vimwiki makes everyday life a lot easier. With vimwiki you can organize almost everything:
- Todo lists
- Diaries
- Protocols
- Project planning
- Code documentation

And pretty much anything you can think of. The perfect plugin if you want to do without bloat-ui-tools.
Now I need a workable calendar for Vim, but that's another story.