dotfiles

<-- duh.
git clone https://hhvn.uk/dotfiles
git clone git://hhvn.uk/dotfiles
Log | Files | Refs | Submodules | LICENSE

vimwiki_media.vim (2794B)


      1 " vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99
      2 " Vimwiki syntax file
      3 " Description: Defines mediaWiki syntax
      4 " Home: https://github.com/vimwiki/vimwiki/
      5 
      6 
      7 " see the comments in vimwiki_default.vim for some info about this file
      8 
      9 
     10 let s:media_syntax = g:vimwiki_syntax_variables['media']
     11 
     12 " text: $ equation_inline $
     13 let s:media_syntax.rxEqIn = '\$[^$`]\+\$'
     14 let s:media_syntax.char_eqin = '\$'
     15 
     16 " text: '''strong'''
     17 let s:media_syntax.rxBold = "'''[^']\\+'''"
     18 let s:media_syntax.char_bold = "'''"
     19 
     20 " text: ''emphasis''
     21 let s:media_syntax.rxItalic = "''[^']\\+''"
     22 let s:media_syntax.char_italic = "''"
     23 
     24 " text: '''''strong italic'''''
     25 let s:media_syntax.rxBoldItalic = "'''''[^']\\+'''''"
     26 let s:media_syntax.rxItalicBold = s:media_syntax.rxBoldItalic
     27 let s:media_syntax.char_bolditalic = "'''''"
     28 let s:media_syntax.char_italicbold = s:media_syntax.char_bolditalic
     29 
     30 " text: `code`
     31 let s:media_syntax.rxCode = '`[^`]\+`'
     32 let s:media_syntax.char_code = '`'
     33 
     34 " text: ~~deleted text~~
     35 let s:media_syntax.rxDelText = '\~\~[^~]\+\~\~'
     36 let s:media_syntax.char_deltext = '\~\~'
     37 
     38 " text: ^superscript^
     39 let s:media_syntax.rxSuperScript = '\^[^^]\+\^'
     40 let s:media_syntax.char_superscript = '^'
     41 
     42 " text: ,,subscript,,
     43 let s:media_syntax.rxSubScript = ',,[^,]\+,,'
     44 let s:media_syntax.char_subscript = ',,'
     45 
     46 " generic headers
     47 let s:media_syntax.rxH = '='
     48 let s:media_syntax.symH = 1
     49 
     50 
     51 
     52 " <hr>, horizontal rule
     53 let s:media_syntax.rxHR = '^-----*$'
     54 
     55 " Tables. Each line starts and ends with '|'; each cell is separated by '|'
     56 let s:media_syntax.rxTableSep = '|'
     57 
     58 " Lists
     59 let s:media_syntax.bullet_types = ['*', '#']
     60 let s:media_syntax.recurring_bullets = 1
     61 let s:media_syntax.number_types = []
     62 let s:media_syntax.list_markers = ['*', '#']
     63 let s:media_syntax.rxListDefine = '^\%(;\|:\)\s'
     64 
     65 " Preformatted text
     66 let s:media_syntax.rxPreStart = '<pre>'
     67 let s:media_syntax.rxPreEnd = '<\/pre>'
     68 
     69 " Math block
     70 let s:media_syntax.rxMathStart = '{{\$'
     71 let s:media_syntax.rxMathEnd = '}}\$'
     72 
     73 let s:media_syntax.rxComment = '^\s*%%.*$'
     74 let s:media_syntax.rxTags = '\%(^\|\s\)\@<=:\%([^:[:space:]]\+:\)\+\%(\s\|$\)\@='
     75 
     76 let s:media_syntax.header_search = '^\s*\(=\{1,6}\)\([^=].*[^=]\)\1\s*$'
     77 let s:media_syntax.header_match = '^\s*\(=\{1,6}\)=\@!\s*__Header__\s*\1=\@!\s*$'
     78 let s:media_syntax.bold_search = "'''\\zs[^']\\+\\ze'''"
     79 let s:media_syntax.bold_match = '''''''__Text__'''''''
     80 " ^- this strange looking thing is equivalent to "'''__Text__'''" but since we later
     81 " want to call escape() on this string, we must keep it in single quotes
     82 let s:media_syntax.wikilink = '\[\[\zs[^\\\]|]\+\ze\%(|[^\\\]]\+\)\?\]\]'
     83 let s:media_syntax.tag_search = '\(^\|\s\)\zs:\([^:''[:space:]]\+:\)\+\ze\(\s\|$\)'
     84 let s:media_syntax.tag_match = '\(^\|\s\):\([^:''[:space:]]\+:\)*__Tag__:'.
     85       \ '\([^:[:space:]]\+:\)*\(\s\|$\)'