vim-python-ide / .vim / syntax / creole.vim

" Vim syntax file
" Language:     creole
" Maintainer:   shellholic <shellholic+vim-creole@gmail.com>
" Last Change:  2011-01-11

syn match creoleUrl     "\(http\|ftp\)://\([a-zA-Z0-9-_~%*@&=+$/#\[\]]\|[(,.?!:;"')]\(\s\|$\)\@!\)*"
syn region creoleEscape matchgroup=creoleKeyword start=+\~+ end=+\s+ end=+$+

syn region creoleLinkBlock   matchgroup=creoleKeyword  start=+\[\[+ end=+\]\]+ contains=creoleLinkBar,creoleBold,creoleItalic,creoleBoldItalic,creoleMiscFormatting,creoleBreak,creoleCode,creoleUrl
syn region creoleImgBlock   matchgroup=creoleKeyword  start=+{{+ end=+}}+ contains=creoleLinkBar,creoleBold,creoleItalic,creoleBoldItalic,creoleMiscFormatting,creoleBreak,creoleCode,creoleUrl
syn match creoleLinkBar "|" contained
syn match creoleLinkBar "->" contained

syn region creoleCode   matchgroup=creoleKeyword  start=+{{{+ end=+}}}+ skip=+^\s\+}}}+

syn region creoleMiscFormatting   matchgroup=creoleKeyword start=+##+ end=+##+ end=+\n+
syn region creoleMiscFormatting   matchgroup=creoleKeyword start=+__+ end=+__+ end=+\n+
syn region creoleMiscFormatting   matchgroup=creoleKeyword start=+--+ end=+--+ end=+\n+
syn region creoleMiscFormatting   matchgroup=creoleKeyword start=+\^\^+ end=+\^\^+ end=+\n+
syn region creoleMiscFormatting   matchgroup=creoleKeyword start=+,,+ end=+,,+ end=+\n+

syn region creolePlugin   matchgroup=creoleKeyword start=+<<+ end=+>>+ end=+\n+

syn region creoleBold   matchgroup=creoleKeyword start=+\*\*+ end=+\*\*+ end=+\n\n+ contains=creoleBoldItalic,creoleLinkBlock
syn region creoleItalic matchgroup=creoleKeyword start=+//+ end=+//+ end=+\n\n+ skip=+://+ contains=creoleBoldItalic,creoleLinkBlock
syn region creoleBoldItalic matchgroup=creoleKeyword start=+\*\*+ end=+\*\*+ end=+\n\n+ contained
syn region creoleBoldItalic matchgroup=creoleKeyword start=+//+ end=+//+ end=+\n\n+ contained

syn region creoleH1     matchgroup=creoleHead start="^\s*=[^=]" end="\(\s*=\+\s*\)\?$"
syn region creoleH2     matchgroup=creoleHead start="^\s*==[^=]" end="\(\s*=\+\s*\)\?$"
syn region creoleH3     matchgroup=creoleHead start="^\s*===[^=]" end="\(\s*=\+\s*\)\?$"
syn region creoleH4     matchgroup=creoleHead start="^\s*====[^=]" end="\(\s*=\+\s*\)\?$"
syn region creoleH5     matchgroup=creoleHead start="^\s*=====[^=]" end="\(\s*=\+\s*\)\?$"
syn region creoleH6     matchgroup=creoleHead start="^\s*======[^=]" end="\(\s*=\+\s*\)\?$"

syn region creoleTableLine matchgroup=creoleTableBorder start=+^\s*|=\?+ end=+|\?\s*$+ contains=creoleTableCell,creoleTableBorder
syn match creoleTableCell "[^|]*\(|=\?\)\@!" contained contains=creoleBold,creoleItalic,creoleBoldItalic,creoleMiscFormatting,creoleBreak,creoleCode
syn match creoleTableBorder "|=\?" contained

syn match creoleHRule   "^\s*----\s*$"
syn match creoleBreak   "\\\\"

syn region creoleList     matchgroup=creoleOperator start="^\s*\(\*\|\#\)\+" end="\n\n" end="\n\([*#:;=>]\)\@=" contains=creoleBold,creoleItalic,creoleBoldItalic,creoleMiscFormatting,creoleBreak,creoleCode
syn region creoleList     matchgroup=creoleOperator start="^\s*\:\+" end="\n\n" end="\n\([*#:;=>]\)\@=" contains=creoleBold,creoleItalic,creoleBoldItalic,creoleMiscFormatting,creoleBreak,creoleCode
syn region creoleList     matchgroup=creoleOperator start="^\s*>\+" end="\n\n" end="\n\([*#:;=>]\)\@=" contains=creoleBold,creoleItalic,creoleBoldItalic,creoleMiscFormatting,creoleBreak,creoleCode
syn region creoleList     matchgroup=creoleOperator start="^\s*;" end="\n\n" end="\n\([*#:;=>]\)\@=" contains=creoleBold,creoleItalic,creoleBoldItalic,creoleMiscFormatting,creoleBreak,creoleCode

hi def link creoleUrl Underlined
hi def link creoleLinkText Todo
hi def link creoleCode Comment
hi def link creolePlugin Statement
hi def link creoleOperator Statement
hi def link creoleKeyword Special
hi def link creoleHead Statement
hi def link creoleH1 Title
hi def link creoleH2 creoleH1
hi def link creoleH3 creoleH2
hi def link creoleH4 creoleH3
hi def link creoleH5 creoleH4
hi def link creoleH6 creoleH5
hi def link creoleHRule Keyword
hi def link creoleBreak Special
hi def link creoleLinkBar Special
hi def link creoleTableBorder Keyword

" inspired by "html.vim"
hi def creoleBold                term=bold cterm=bold gui=bold
hi def creoleBoldUnderline       term=bold,underline cterm=bold,underline gui=bold,underline
hi def creoleBoldItalic          term=bold,italic cterm=bold,italic gui=bold,italic
hi def creoleBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
hi def creoleUnderline           term=underline cterm=underline gui=underline
hi def creoleUnderlineItalic     term=italic,underline cterm=italic,underline gui=italic,underline
hi def creoleItalic              term=italic cterm=italic gui=italic
hi def link creoleMiscFormatting Comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.