Write Dokuwiki pages in vim with DokuVimKi
Making our writing as comfortable as possible is important if we want to maximize our productivity. When we write code we usually use tools that make writing comfortable but when it comes to documentation we still lack some of that comfort. Recently I discovered DokuVimKi which is a vim plugin that connects vim to Dokuwiki.
Over the years I used (or had to use) a variety of documentation systems like twiki, Dokuwiki, Mediawiki, Confluence, MS Word documents and Redmine Wiki. I never got used to writing text in a browser in a WYSIWYG editor. For me that is an awful user experience.
So my normal mode of operation was to copy the contents of a page into vim, edit it and copy it back. My favorite Wiki still is Dokuwiki and a plugin that makes that process incredibly easy is DokuVimKi (https://github.com/kynan/dokuvimki).
It connects to Dokuwiki through the API which is disabled by default. To enable it we need three steps:
- Create an API user (if we do not want to use an existing one for the API calls)
- Enable the API
$conf['remote'] = 1; //Enable/disable remote interfaces
- Give access to the API user
$conf['remoteuser'] = 'api_user'; //user/groups that have access to remote interface (comma separated)
In addition to that I created an alias in my bashrc.
alias d='vim -c DokuVimKi'
Now I am able to to open my documentation with a simple
d command on the shell without any detours. That is what perfect UX design means to me.
Similar plugins exist for other wiki systems. For Confluence you might want to try vimfluence (https://github.com/orlandov/vimfluence). For Mediawiki there is vim-mediawiki (https://github.com/m-pilia/vim-mediawiki).