dotfiles

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

vimwiki_default.vim (3912B)


      1 " vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99
      2 " Vimwiki syntax file
      3 " Description: Defines default syntax
      4 " Home: https://github.com/vimwiki/vimwiki/
      5 
      6 
      7 " s:default_syntax is kind of a reference to the dict in
      8 " g:vimwiki_syntax_variables['default']. It is used here simply as an
      9 " abbreviation for the latter.
     10 let s:default_syntax = g:vimwiki_syntax_variables['default']
     11 
     12 
     13 
     14 " text: $ equation_inline $
     15 let s:default_syntax.rxEqIn = '\$[^$`]\+\$'
     16 let s:default_syntax.char_eqin = '\$'
     17 
     18 " text: *strong*
     19 " let s:default_syntax.rxBold = '\*[^*]\+\*'
     20 let s:default_syntax.rxBold = '\%(^\|\s\|[[:punct:]]\)\@<='.
     21       \'\*'.
     22       \'\%([^*`[:space:]][^*`]*[^*`[:space:]]\|[^*`[:space:]]\)'.
     23       \'\*'.
     24       \'\%([[:punct:]]\|\s\|$\)\@='
     25 let s:default_syntax.char_bold = '*'
     26 
     27 " text: _emphasis_
     28 " let s:default_syntax.rxItalic = '_[^_]\+_'
     29 let s:default_syntax.rxItalic = '\%(^\|\s\|[[:punct:]]\)\@<='.
     30       \'_'.
     31       \'\%([^_`[:space:]][^_`]*[^_`[:space:]]\|[^_`[:space:]]\)'.
     32       \'_'.
     33       \'\%([[:punct:]]\|\s\|$\)\@='
     34 let s:default_syntax.char_italic = '_'
     35 
     36 " text: *_bold italic_* or _*italic bold*_
     37 let s:default_syntax.rxBoldItalic = '\%(^\|\s\|[[:punct:]]\)\@<='.
     38       \'\*_'.
     39       \'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
     40       \'_\*'.
     41       \'\%([[:punct:]]\|\s\|$\)\@='
     42 let s:default_syntax.char_bolditalic = '\*_'
     43 
     44 let s:default_syntax.rxItalicBold = '\%(^\|\s\|[[:punct:]]\)\@<='.
     45       \'_\*'.
     46       \'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
     47       \'\*_'.
     48       \'\%([[:punct:]]\|\s\|$\)\@='
     49 let s:default_syntax.char_italicbold = '_\*'
     50 
     51 " text: `code`
     52 let s:default_syntax.rxCode = '`[^`]\+`'
     53 let s:default_syntax.char_code = '`'
     54 
     55 " text: ~~deleted text~~
     56 let s:default_syntax.rxDelText = '\~\~[^~`]\+\~\~'
     57 let s:default_syntax.char_deltext = '\~\~'
     58 
     59 " text: ^superscript^
     60 let s:default_syntax.rxSuperScript = '\^[^^`]\+\^'
     61 let s:default_syntax.char_superscript = '^'
     62 
     63 " text: ,,subscript,,
     64 let s:default_syntax.rxSubScript = ',,[^,`]\+,,'
     65 let s:default_syntax.char_subscript = ',,'
     66 
     67 " generic headers
     68 let s:default_syntax.rxH = '='
     69 let s:default_syntax.symH = 1
     70 
     71 
     72 
     73 " <hr>, horizontal rule
     74 let s:default_syntax.rxHR = '^-----*$'
     75 
     76 " Tables. Each line starts and ends with '|'; each cell is separated by '|'
     77 let s:default_syntax.rxTableSep = '|'
     78 
     79 " Lists
     80 let s:default_syntax.bullet_types = ['-', '*', '#']
     81 " 1 means the bullets can be repeatet to indicate the level, like * ** ***
     82 " 0 means the bullets stand on their own and the level is indicated by the indentation
     83 let s:default_syntax.recurring_bullets = 0
     84 let s:default_syntax.number_types = ['1)', '1.', 'i)', 'I)', 'a)', 'A)']
     85 "this should contain at least one element
     86 "it is used for i_<C-L><C-J> among other things
     87 let s:default_syntax.list_markers = ['-', '1.', '*', 'I)', 'a)']
     88 let s:default_syntax.rxListDefine = '::\(\s\|$\)'
     89 
     90 " Preformatted text
     91 let s:default_syntax.rxPreStart = '{{{'
     92 let s:default_syntax.rxPreEnd = '}}}'
     93 
     94 " Math block
     95 let s:default_syntax.rxMathStart = '{{\$'
     96 let s:default_syntax.rxMathEnd = '}}\$'
     97 
     98 let s:default_syntax.rxComment = '^\s*%%.*$'
     99 let s:default_syntax.rxTags = '\%(^\|\s\)\@<=:\%([^:''[:space:]]\+:\)\+\%(\s\|$\)\@='
    100 
    101 let s:default_syntax.header_search = '^\s*\(=\{1,6}\)\([^=].*[^=]\)\1\s*$'
    102 let s:default_syntax.header_match = '^\s*\(=\{1,6}\)=\@!\s*__Header__\s*\1=\@!\s*$'
    103 let s:default_syntax.bold_search = '\%(^\|\s\|[[:punct:]]\)\@<=\*\zs\%([^*`[:space:]][^*`]*'.
    104       \ '[^*`[:space:]]\|[^*`[:space:]]\)\ze\*\%([[:punct:]]\|\s\|$\)\@='
    105 let s:default_syntax.bold_match = '\%(^\|\s\|[[:punct:]]\)\@<=\*__Text__\*'.
    106       \ '\%([[:punct:]]\|\s\|$\)\@='
    107 let s:default_syntax.wikilink = '\[\[\zs[^\\\]|]\+\ze\%(|[^\\\]]\+\)\?\]\]'
    108 let s:default_syntax.tag_search = '\(^\|\s\)\zs:\([^:''[:space:]]\+:\)\+\ze\(\s\|$\)'
    109 let s:default_syntax.tag_match =  '\(^\|\s\):\([^:''[:space:]]\+:\)*__Tag__:'.
    110       \ '\([^:[:space:]]\+:\)*\(\s\|$\)'