Click here to see what syntax highlighting in Vim looks like. Warning — the above link takes you directly to unfiltered HTML.
Save the target of the following link to your "syntax" directory. By default, this directory is "~/.vim/syntax" on a Unix system, and "C:\Program Files\Vim\vimfiles\syntax" on a Windows system.
To autodetect files ending in ".wiki", add the following lines to ".vim/filetype.vim" or "vimfiles\filetype.vim" (or create the file if it doesn't exist):
augroup filetypedetect au BufNewFile,BufRead *.wiki setf wikipedia augroup END
Alternatively, the command "set syn=wikipedia" will temporarily set the syntax for the current file.
If you are not familiar with Vim, here's some advice. Wikipedia articles often only have line-breaks at the end of each paragraph, a situation Vim is not designed for. The following lines added to your ".vimrc" or "_vimrc" file will make it much easier to edit such files:
set tw=0 set lbr map <Up> gk map <Down> gj imap <Up> <ESC>gki imap <Down> <ESC>gji
Please feel free to edit wikipedia.vim and upload an improved copy. This is a Wiki, after all.
Search Encyclopedia
|
Featured Article
|