VIM syntax highlighting for DokuWiki
written on Tuesday, October 4, 2011
I use DokuWiki pretty heavily for my studies and at my job to accomplish all kind of tasks. Another piece of software I use on a daily basis is the editor VIM.
Now, when it comes to editing, syntax highlighting is a very useful thing, especially for long files. VIM provides syntax files for more than 130 languages, even more can be found on vim-scripts. There is even syntax highlighting for DokuWiki available, but I was not very happy with it.
So, here is my implementation. You can find it on my github page or on it's vim-script page.
Screenshots
The colorschemes in use are neon and slate.
Installation
Just grab a copy of dokuwiki.vim and copy the file in your ~/.vim/syntax/ directory.
A better alternative is to use a VIM package manager such as Vundle.
Since DokuWiki uses no particular file ending you need to set the filetype manually with the command :set ft=dokuwiki. You can use the DokuWiki comment plugin to automate the task. Simply append the line below to your wiki page:
This line will only be visible while editing the wiki page.