2018-02-21 07:11:51 +01:00
|
|
|
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=99
|
2010-01-20 01:00:00 +01:00
|
|
|
" Vimwiki syntax file
|
2015-02-23 12:10:42 +01:00
|
|
|
" Desc: Defines default syntax
|
|
|
|
" Home: https://github.com/vimwiki/vimwiki/
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2016-12-28 22:17:08 +01:00
|
|
|
" s:default_syntax is kind of a reference to the dict in
|
|
|
|
" g:vimwiki_syntax_variables['default']. It is used here simply as an
|
|
|
|
" abbreviation for the latter.
|
|
|
|
let s:default_syntax = g:vimwiki_syntax_variables['default']
|
|
|
|
|
2012-06-07 02:00:00 +02:00
|
|
|
" text: $ equation_inline $
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxEqIn = '\$[^$`]\+\$'
|
|
|
|
let s:default_syntax.char_eqin = '\$'
|
2012-06-07 02:00:00 +02:00
|
|
|
|
2010-01-20 01:00:00 +01:00
|
|
|
" text: *strong*
|
2016-12-28 22:17:08 +01:00
|
|
|
" let s:default_syntax.rxBold = '\*[^*]\+\*'
|
|
|
|
let s:default_syntax.rxBold = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
2010-01-20 01:00:00 +01:00
|
|
|
\'\*'.
|
2010-05-12 02:00:00 +02:00
|
|
|
\'\%([^*`[:space:]][^*`]*[^*`[:space:]]\|[^*`[:space:]]\)'.
|
2010-01-20 01:00:00 +01:00
|
|
|
\'\*'.
|
|
|
|
\'\%([[:punct:]]\|\s\|$\)\@='
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.char_bold = '*'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: _emphasis_
|
2016-12-28 22:17:08 +01:00
|
|
|
" let s:default_syntax.rxItalic = '_[^_]\+_'
|
|
|
|
let s:default_syntax.rxItalic = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
2010-01-20 01:00:00 +01:00
|
|
|
\'_'.
|
2010-05-12 02:00:00 +02:00
|
|
|
\'\%([^_`[:space:]][^_`]*[^_`[:space:]]\|[^_`[:space:]]\)'.
|
2010-01-20 01:00:00 +01:00
|
|
|
\'_'.
|
|
|
|
\'\%([[:punct:]]\|\s\|$\)\@='
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.char_italic = '_'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: *_bold italic_* or _*italic bold*_
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxBoldItalic = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
2010-01-20 01:00:00 +01:00
|
|
|
\'\*_'.
|
2010-05-12 02:00:00 +02:00
|
|
|
\'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
|
2010-01-20 01:00:00 +01:00
|
|
|
\'_\*'.
|
|
|
|
\'\%([[:punct:]]\|\s\|$\)\@='
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.char_bolditalic = '\*_'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxItalicBold = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
2010-01-20 01:00:00 +01:00
|
|
|
\'_\*'.
|
2010-05-12 02:00:00 +02:00
|
|
|
\'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
|
2010-01-20 01:00:00 +01:00
|
|
|
\'\*_'.
|
|
|
|
\'\%([[:punct:]]\|\s\|$\)\@='
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.char_italicbold = '_\*'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: `code`
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxCode = '`[^`]\+`'
|
|
|
|
let s:default_syntax.char_code = '`'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: ~~deleted text~~
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxDelText = '\~\~[^~`]\+\~\~'
|
|
|
|
let s:default_syntax.char_deltext = '\~\~'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: ^superscript^
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxSuperScript = '\^[^^`]\+\^'
|
|
|
|
let s:default_syntax.char_superscript = '^'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: ,,subscript,,
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxSubScript = ',,[^,`]\+,,'
|
|
|
|
let s:default_syntax.char_subscript = ',,'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2012-06-07 02:00:00 +02:00
|
|
|
" generic headers
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxH = '='
|
|
|
|
let s:default_syntax.symH = 1
|
2012-06-07 02:00:00 +02:00
|
|
|
|
|
|
|
|
2010-08-24 02:00:00 +02:00
|
|
|
|
2010-01-20 01:00:00 +01:00
|
|
|
" <hr>, horizontal rule
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxHR = '^-----*$'
|
2012-06-07 02:00:00 +02:00
|
|
|
|
|
|
|
" Tables. Each line starts and ends with '|'; each cell is separated by '|'
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxTableSep = '|'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2013-07-14 18:58:46 +02:00
|
|
|
" Lists
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.bullet_types = ['-', '*', '#']
|
|
|
|
" 1 means the bullets can be repeatet to indicate the level, like * ** ***
|
|
|
|
" 0 means the bullets stand on their own and the level is indicated by the indentation
|
|
|
|
let s:default_syntax.recurring_bullets = 0
|
|
|
|
let s:default_syntax.number_types = ['1)', '1.', 'i)', 'I)', 'a)', 'A)']
|
2013-07-14 18:58:46 +02:00
|
|
|
"this should contain at least one element
|
2013-07-17 15:57:35 +02:00
|
|
|
"it is used for i_<C-L><C-J> among other things
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.list_markers = ['-', '1.', '*', 'I)', 'a)']
|
|
|
|
let s:default_syntax.rxListDefine = '::\(\s\|$\)'
|
2013-07-17 15:57:35 +02:00
|
|
|
|
2010-01-20 01:00:00 +01:00
|
|
|
" Preformatted text
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxPreStart = '{{{'
|
|
|
|
let s:default_syntax.rxPreEnd = '}}}'
|
2011-06-11 02:00:00 +02:00
|
|
|
|
2012-06-07 02:00:00 +02:00
|
|
|
" Math block
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:default_syntax.rxMathStart = '{{\$'
|
|
|
|
let s:default_syntax.rxMathEnd = '}}\$'
|
|
|
|
|
|
|
|
let s:default_syntax.rxComment = '^\s*%%.*$'
|
|
|
|
let s:default_syntax.rxTags = '\%(^\|\s\)\@<=:\%([^:''[:space:]]\+:\)\+\%(\s\|$\)\@='
|
|
|
|
|
|
|
|
let s:default_syntax.header_search = '^\s*\(=\{1,6}\)\([^=].*[^=]\)\1\s*$'
|
|
|
|
let s:default_syntax.header_match = '^\s*\(=\{1,6}\)=\@!\s*__Header__\s*\1=\@!\s*$'
|
|
|
|
let s:default_syntax.bold_search = '\%(^\|\s\|[[:punct:]]\)\@<=\*\zs\%([^*`[:space:]][^*`]*[^*`[:space:]]\|[^*`[:space:]]\)\ze\*\%([[:punct:]]\|\s\|$\)\@='
|
|
|
|
let s:default_syntax.bold_match = '\%(^\|\s\|[[:punct:]]\)\@<=\*__Text__\*\%([[:punct:]]\|\s\|$\)\@='
|
|
|
|
let s:default_syntax.wikilink = '\[\[\zs[^\\\]|]\+\ze\%(|[^\\\]]\+\)\?\]\]'
|
|
|
|
let s:default_syntax.tag_search = '\(^\|\s\)\zs:\([^:''[:space:]]\+:\)\+\ze\(\s\|$\)'
|
|
|
|
let s:default_syntax.tag_match = '\(^\|\s\):\([^:''[:space:]]\+:\)*__Tag__:\([^:[:space:]]\+:\)*\(\s\|$\)'
|