2018-04-20 07:03:53 +02:00
|
|
|
" vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99
|
2010-01-20 01:00:00 +01:00
|
|
|
" Vimwiki syntax file
|
2018-04-20 07:03:53 +02:00
|
|
|
" Description: Defines mediaWiki syntax
|
2015-02-23 12:10:42 +01:00
|
|
|
" Home: https://github.com/vimwiki/vimwiki/
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2018-04-20 07:03:53 +02:00
|
|
|
|
2017-01-07 21:51:15 +01:00
|
|
|
" see the comments in vimwiki_default.vim for some info about this file
|
|
|
|
|
2018-04-20 07:03:53 +02:00
|
|
|
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax = g:vimwiki_syntax_variables['media']
|
|
|
|
|
2012-06-07 02:00:00 +02:00
|
|
|
" text: $ equation_inline $
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxEqIn = '\$[^$`]\+\$'
|
|
|
|
let s:media_syntax.char_eqin = '\$'
|
2012-06-07 02:00:00 +02:00
|
|
|
|
2010-01-20 01:00:00 +01:00
|
|
|
" text: '''strong'''
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxBold = "'''[^']\\+'''"
|
|
|
|
let s:media_syntax.char_bold = "'''"
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: ''emphasis''
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxItalic = "''[^']\\+''"
|
|
|
|
let s:media_syntax.char_italic = "''"
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: '''''strong italic'''''
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxBoldItalic = "'''''[^']\\+'''''"
|
|
|
|
let s:media_syntax.rxItalicBold = s:media_syntax.rxBoldItalic
|
|
|
|
let s:media_syntax.char_bolditalic = "'''''"
|
|
|
|
let s:media_syntax.char_italicbold = s:media_syntax.char_bolditalic
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: `code`
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxCode = '`[^`]\+`'
|
|
|
|
let s:media_syntax.char_code = '`'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: ~~deleted text~~
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxDelText = '\~\~[^~]\+\~\~'
|
|
|
|
let s:media_syntax.char_deltext = '\~\~'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: ^superscript^
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxSuperScript = '\^[^^]\+\^'
|
|
|
|
let s:media_syntax.char_superscript = '^'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: ,,subscript,,
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxSubScript = ',,[^,]\+,,'
|
|
|
|
let s:media_syntax.char_subscript = ',,'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2012-06-07 02:00:00 +02:00
|
|
|
" generic headers
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxH = '='
|
|
|
|
let s:media_syntax.symH = 1
|
2012-06-07 02:00:00 +02:00
|
|
|
|
|
|
|
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" <hr>, horizontal rule
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxHR = '^-----*$'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2012-06-07 02:00:00 +02:00
|
|
|
" Tables. Each line starts and ends with '|'; each cell is separated by '|'
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxTableSep = '|'
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2013-07-14 18:58:46 +02:00
|
|
|
" Lists
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.bullet_types = ['*', '#']
|
2016-12-28 22:17:08 +01:00
|
|
|
let s:media_syntax.recurring_bullets = 1
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.number_types = []
|
|
|
|
let s:media_syntax.list_markers = ['*', '#']
|
|
|
|
let s:media_syntax.rxListDefine = '^\%(;\|:\)\s'
|
2013-07-18 07:55:24 +02:00
|
|
|
|
2010-01-20 01:00:00 +01:00
|
|
|
" Preformatted text
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxPreStart = '<pre>'
|
|
|
|
let s:media_syntax.rxPreEnd = '<\/pre>'
|
2011-06-11 02:00:00 +02:00
|
|
|
|
2012-06-07 02:00:00 +02:00
|
|
|
" Math block
|
2017-01-07 21:51:15 +01:00
|
|
|
let s:media_syntax.rxMathStart = '{{\$'
|
|
|
|
let s:media_syntax.rxMathEnd = '}}\$'
|
|
|
|
|
|
|
|
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\%(|[^\\\]]\+\)\?\]\]'
|
2018-04-20 07:03:53 +02:00
|
|
|
let s:media_syntax.tag_search = '\(^\|\s\)\zs:\([^:''[:space:]]\+:\)\+\ze\(\s\|$\)'
|
|
|
|
let s:media_syntax.tag_match = '\(^\|\s\):\([^:''[:space:]]\+:\)*__Tag__:'.
|
|
|
|
\ '\([^:[:space:]]\+:\)*\(\s\|$\)'
|