" vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99 " Vimwiki syntax file " Description: Defines mediaWiki syntax " Home: https://github.com/vimwiki/vimwiki/ " see the comments in vimwiki_default.vim for some info about this file let s:media_syntax = g:vimwiki_syntax_variables['media'] let s:media_syntax.dTypeface = {} " text: '''strong''' let s:media_syntax.dTypeface['bold'] = [ \ ['\S\@<=''''''\|''''''\S\@=', '\S\@<=''''''\|''''''\S\@='], \ ] " text: ''italic'' let s:media_syntax.dTypeface['italic'] = [ \ ['\S\@<=''''\|''''\S\@=', '\S\@<=''''\|''''\S\@='], \ ] " text: no underline defined let s:media_syntax.dTypeface['underline'] = [] " text: '''''strong italic''''' let s:media_syntax.dTypeface['bold_italic'] = [ \ ['\S\@<=''''''''''\|''''''''''\S\@=', '\S\@<=''''''''''\|''''''''''\S\@='], \ ] " text: $ equation_inline $ let s:media_syntax.rxEqIn = '\$[^$`]\+\$' let s:media_syntax.char_eqin = '\$' " text: `code` let s:media_syntax.rxCode = '`[^`]\+`' let s:media_syntax.char_code = '`' " text: ~~deleted text~~ let s:media_syntax.rxDelText = '\~\~[^~]\+\~\~' let s:media_syntax.char_deltext = '\~\~' " text: ^superscript^ let s:media_syntax.rxSuperScript = '\^[^^]\+\^' let s:media_syntax.char_superscript = '^' " text: ,,subscript,, let s:media_syntax.rxSubScript = ',,[^,]\+,,' let s:media_syntax.char_subscript = ',,' " generic headers let s:media_syntax.rxH = '=' let s:media_syntax.symH = 1 "
' let s:media_syntax.rxPreEnd = '<\/pre>' " Math block let s:media_syntax.rxMathStart = '{{\$' let s:media_syntax.rxMathEnd = '}}\$' " NOTE: There is no multi-line comment syntax for MediaWiki let s:media_syntax.rxMultilineCommentStart = '' let s:media_syntax.rxMultilineCommentEnd = '' let s:media_syntax.rxComment = '^\s*%%.*$' let s:media_syntax.rxTags = '\%(^\|\s\)\@<=:\%([^:[:space:]]\+:\)\+\%(\s\|$\)\@=' let s:media_syntax.header_search = '^\s*\(=\{1,6}\)\([^=].*[^=]\)\1\s*$' let s:media_syntax.header_match = '^\s*\(=\{1,6}\)=\@!\s*__Header__\s*\1=\@!\s*$' let s:media_syntax.bold_search = "'''\\zs[^']\\+\\ze'''" let s:media_syntax.bold_match = '''''''__Text__''''''' " ^- this strange looking thing is equivalent to "'''__Text__'''" but since we later " want to call escape() on this string, we must keep it in single quotes let s:media_syntax.wikilink = '\[\[\zs[^\\\]|]\+\ze\%(|[^\\\]]\+\)\?\]\]' let s:media_syntax.tag_search = '\(^\|\s\)\zs:\([^:''[:space:]]\+:\)\+\ze\(\s\|$\)' let s:media_syntax.tag_match = '\(^\|\s\):\([^:''[:space:]]\+:\)*__Tag__:'. \ '\([^:[:space:]]\+:\)*\(\s\|$\)'