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']
|
|
|
|
|
2010-01-20 01:00:00 +01:00
|
|
|
" text: '''strong'''
|
2020-08-02 09:51:25 +02:00
|
|
|
let s:media_syntax.dTypeface['bold'] = [
|
|
|
|
\ ['\S\@<=''''''\|''''''\S\@=', '\S\@<=''''''\|''''''\S\@='],
|
|
|
|
\ ]
|
2010-01-20 01:00:00 +01:00
|
|
|
|
2020-08-02 09:51:25 +02:00
|
|
|
" text: ''italic''
|
|
|
|
let s:media_syntax.dTypeface['italic'] = [
|
|
|
|
\ ['\S\@<=''''\|''''\S\@=', '\S\@<=''''\|''''\S\@='],
|
|
|
|
\ ]
|
|
|
|
|
|
|
|
" text: no underline defined
|
|
|
|
let s:media_syntax.dTypeface['underline'] = []
|
2010-01-20 01:00:00 +01:00
|
|
|
|
|
|
|
" text: '''''strong italic'''''
|
2020-08-02 09:51:25 +02:00
|
|
|
let s:media_syntax.dTypeface['bold_italic'] = [
|
|
|
|
\ ['\S\@<=''''''''''\|''''''''''\S\@=', '\S\@<=''''''''''\|''''''''''\S\@='],
|
|
|
|
\ ]
|
|
|
|
|
|
|
|
|
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 = '}}\$'
|
|
|
|
|
2020-08-01 07:12:21 +02:00
|
|
|
" NOTE: There is no multi-line comment syntax for MediaWiki
|
|
|
|
let s:media_syntax.rxMultilineCommentStart = ''
|
|
|
|
let s:media_syntax.rxMultilineCommentEnd = ''
|
2017-01-07 21:51:15 +01:00
|
|
|
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\|$\)'
|