Redmine wiki syntax highlighting for Vim
Vim script
Latest commit 68402e4 Dec 22, 2016 @s3rvac Fix highlighting of links inside lists.
This commit fixes highlighting of wiki and issue links inside lists:

* A wiki link [[Page|page]] inside list.
* An issue link #1234 inside list.

Previously, such links were not highlighted.
Permalink
Failed to load latest commit information.
syntax Fix highlighting of links inside lists. Dec 22, 2016
README.md Change link to Redmine from HTTP to HTTPS. May 31, 2016

README.md

Redmine Wiki Syntax For Vim

A Vim syntax-highlighting file for the Redmine wiki.

Installation

If you use pathogen, simply go into the bundle directory and clone the repository in there:

cd ~/.vim/bundle
git clone https://github.com/s3rvac/vim-syntax-redminewiki.git

You can also install the plugin manually by copying the syntax/redminewiki.vim file to your ~/.vim/syntax directory. If that directory does not exist, create it.

Usage

When you edit a Redmine wiki page in Vim, execute :set ft=redminewiki to select the Redmine wiki highlighting (make sure that you have enabled syntax highlighting). Alternatively, you can put the following autocommand to your .vimrc:

" Consider all .redmine files as Redmine wiki files.
au BufNewFile,BufRead *.redmine set filetype=redminewiki

where redmine is the suffix of your Redmine wiki files.

If you use the It's All Text Firefox plugin to edit textareas in Vim, you can add something along these lines to your .vimrc:

let s:opened_file_path = expand('%:p')
if s:opened_file_path =~ '\.mozilla/firefox/.*redmine'
    au BufRead,BufNewFile *.txt set filetype=redminewiki
endif

Then, when you launch Vim to edit a Redmine page (e.g. wiki or issue), a proper file type will be selected automatically. Of course, this can be set up also for other browser plugins, such as Vimperator. You just need to adjust the regular expression matching s:opened_file_path.

Credits

This syntax file is heavily based on the textile.vim syntax file by Kornelius Kalnbach korny@cYcnus.de, 2006.