sponsor Vim development Vim logo Vim Book Ad

dokuwiki.vim : A simple syntax file for DokuWiki.

 script karma  Rating 5/4, Downloaded by 1164  Comments, bugs, improvements  Vim wiki

created by
Bill Powell
 
script type
syntax
 
description
A simple syntax file for DokuWiki.

This consists completely of slight modifications to wikipedia.vim, vimscript #1787, so you'll need to get
that script too, or not much will happen.

I'm no expert, so do let me know if you find any mistakes. My email is in both files. Thanks. :)

This file also provides a few mappings for doing those pesky headers.

,,h1 through ,,h6 will give you a header. This should allow you to press ",,h1" in INSERT mode, then type your header, then press <C-j> to
jump to the next line.

(If <C-j> doesn't jump for you, let me know; this may require latex-suite
(http://vim-latex.sf.net), but that would be a hefty thing to download just for this.)

You can also use ,,hd to demote a header, and ,,hp to promote it.
 
install details
First get Wikimedia.vim (vimscript #1787).

Then, just copy dokuwiki.vim to your $HOME/.vim/syntax/ directory.

At present, you have to activate this highlighting manually.

:se ft=dokuwiki

because there isn't a canonical extension for DokuWiki files (at least, that I know of). However, you can set all *.txt files to automatically be set to DokuWiki if you wish.

Make or edit $HOME/.vim/ftdetect/txt.vim:

" Taken from http://en.wikipedia.org/wiki/Wikipedia:Text_editor_support#Vim
" Ian Tegebo <ian.tegebo@gmail.com>

augroup filetypedetect
au BufNewFile,BufRead *.txt,*.wiki setf dokuwiki
augroup END

Now any *txt or *wiki file should open as dokuwiki.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
dokuwiki.vim 0.1 2008-09-11 6.0 Bill Powell Initial upload
ip used for rating: 34.239.158.107

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
OSDN.net Logo