2012-06-07 02:00:00 +02:00
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=79
" Vimwiki syntax file
2015-02-23 12:10:42 +01:00
" Desc: Special stuff for markdown syntax
" Home: https://github.com/vimwiki/vimwiki/
2012-06-07 02:00:00 +02:00
" LINKS: assume this is common to all syntaxes "{{{
" }}}
" -------------------------------------------------------------------------
" Load concrete Wiki syntax: sets regexes and templates for headers and links
" -------------------------------------------------------------------------
" LINKS: setup of larger regexes {{{
" LINKS: setup wikilink0 regexps {{{
" 0. [[URL]], or [[URL|DESCRIPTION]]
" 0a) match [[URL|DESCRIPTION]]
let g :vimwiki_rxWikiLink0 = g :vimwiki_rxWikiLink
" 0b) match URL within [[URL|DESCRIPTION]]
let g :vimwiki_rxWikiLink0MatchUrl = g :vimwiki_rxWikiLinkMatchUrl
" 0c) match DESCRIPTION within [[URL|DESCRIPTION]]
let g :vimwiki_rxWikiLink0MatchDescr = g :vimwiki_rxWikiLinkMatchDescr
" }}}
" LINKS: setup wikilink1 regexps {{{
" 1. [URL][], or [DESCRIPTION][URL]
2014-06-22 16:26:40 +02:00
let s :wikilink_md_prefix = '['
let s :wikilink_md_suffix = ']'
let s :wikilink_md_separator = ']['
let s :rx_wikilink_md_prefix = vimwiki #u #escape ( s :wikilink_md_prefix )
let s :rx_wikilink_md_suffix = vimwiki #u #escape ( s :wikilink_md_suffix )
let s :rx_wikilink_md_separator = vimwiki #u #escape ( s :wikilink_md_separator )
2012-06-07 02:00:00 +02:00
" [URL][]
2014-06-22 16:26:40 +02:00
let g :vimwiki_WikiLink1Template1 = s :wikilink_md_prefix . '__LinkUrl__' .
\ s :wikilink_md_separator . s :wikilink_md_suffix
2012-06-07 02:00:00 +02:00
" [DESCRIPTION][URL]
2014-06-22 16:26:40 +02:00
let g :vimwiki_WikiLink1Template2 = s :wikilink_md_prefix . '__LinkDescription__' .
\ s :wikilink_md_separator . '__LinkUrl__' .
\ s :wikilink_md_suffix
2012-06-07 02:00:00 +02:00
"
2014-06-19 15:36:11 +02:00
let g :vimwiki_WikiLinkMatchUrlTemplate .=
\ '\|' .
2014-06-22 16:26:40 +02:00
\ s :rx_wikilink_md_prefix .
2014-06-19 15:36:11 +02:00
\ '.*' .
2014-06-22 16:26:40 +02:00
\ s :rx_wikilink_md_separator .
2014-06-19 15:36:11 +02:00
\ '\zs__LinkUrl__\ze\%(#.*\)\?' .
2014-06-22 16:26:40 +02:00
\ s :rx_wikilink_md_suffix .
2014-06-19 15:36:11 +02:00
\ '\|' .
2014-06-22 16:26:40 +02:00
\ s :rx_wikilink_md_prefix .
2014-06-19 15:36:11 +02:00
\ '\zs__LinkUrl__\ze\%(#.*\)\?' .
2014-06-22 16:26:40 +02:00
\ s :rx_wikilink_md_separator .
\ s :rx_wikilink_md_suffix
2012-06-07 02:00:00 +02:00
2014-06-19 15:36:11 +02:00
let s :valid_chars = '[^\\\[\]]'
2014-02-24 12:16:23 +01:00
let g :vimwiki_rxWikiLink1Url = s :valid_chars .'\{-}'
let g :vimwiki_rxWikiLink1Descr = s :valid_chars .'\{-}'
2012-06-07 02:00:00 +02:00
let g :vimwiki_rxWikiLink1InvalidPrefix = '[\]\[]\@<!'
let g :vimwiki_rxWikiLink1InvalidSuffix = '[\]\[]\@!'
2014-06-22 16:26:40 +02:00
let s :rx_wikilink_md_prefix = g :vimwiki_rxWikiLink1InvalidPrefix .
\ s :rx_wikilink_md_prefix
let s :rx_wikilink_md_suffix = s :rx_wikilink_md_suffix .
2012-06-07 02:00:00 +02:00
\ g :vimwiki_rxWikiLink1InvalidSuffix
"
" 1. [URL][], [DESCRIPTION][URL]
" 1a) match [URL][], [DESCRIPTION][URL]
2014-06-22 16:26:40 +02:00
let g :vimwiki_rxWikiLink1 = s :rx_wikilink_md_prefix .
\ g :vimwiki_rxWikiLink1Url . s :rx_wikilink_md_separator .
\ s :rx_wikilink_md_suffix .
\ '\|' . s :rx_wikilink_md_prefix .
\ g :vimwiki_rxWikiLink1Descr .s :rx_wikilink_md_separator .
\ g :vimwiki_rxWikiLink1Url .s :rx_wikilink_md_suffix
2012-06-07 02:00:00 +02:00
" 1b) match URL within [URL][], [DESCRIPTION][URL]
2014-06-22 16:26:40 +02:00
let g :vimwiki_rxWikiLink1MatchUrl = s :rx_wikilink_md_prefix .
\ '\zs' . g :vimwiki_rxWikiLink1Url . '\ze' . s :rx_wikilink_md_separator .
\ s :rx_wikilink_md_suffix .
\ '\|' . s :rx_wikilink_md_prefix .
\ g :vimwiki_rxWikiLink1Descr . s :rx_wikilink_md_separator .
\ '\zs' . g :vimwiki_rxWikiLink1Url . '\ze' . s :rx_wikilink_md_suffix
2012-06-07 02:00:00 +02:00
" 1c) match DESCRIPTION within [DESCRIPTION][URL]
2014-06-22 16:26:40 +02:00
let g :vimwiki_rxWikiLink1MatchDescr = s :rx_wikilink_md_prefix .
\ '\zs' . g :vimwiki_rxWikiLink1Descr .'\ze' . s :rx_wikilink_md_separator .
\ g :vimwiki_rxWikiLink1Url .s :rx_wikilink_md_suffix
2012-06-07 02:00:00 +02:00
" }}}
" LINKS: Syntax helper {{{
2014-06-22 16:26:40 +02:00
let g :vimwiki_rxWikiLink1Prefix1 = s :rx_wikilink_md_prefix
let g :vimwiki_rxWikiLink1Suffix1 = s :rx_wikilink_md_separator .
\ g :vimwiki_rxWikiLink1Url .s :rx_wikilink_md_suffix
2012-06-07 02:00:00 +02:00
" }}}
" *. ANY wikilink {{{
" *a) match ANY wikilink
let g :vimwiki_rxWikiLink = '' .
\ g :vimwiki_rxWikiLink0 .'\|' .
\ g :vimwiki_rxWikiLink1
" *b) match URL within ANY wikilink
let g :vimwiki_rxWikiLinkMatchUrl = '' .
\ g :vimwiki_rxWikiLink0MatchUrl .'\|' .
\ g :vimwiki_rxWikiLink1MatchUrl
" *c) match DESCRIPTION within ANY wikilink
let g :vimwiki_rxWikiLinkMatchDescr = '' .
\ g :vimwiki_rxWikiLink0MatchDescr .'\|' .
\ g :vimwiki_rxWikiLink1MatchDescr
" }}}
" LINKS: setup of wikiincl regexps {{{
" }}}
" LINKS: Syntax helper {{{
" }}}
" LINKS: Setup weblink0 regexps {{{
2013-04-19 05:46:58 +02:00
" 0. URL : free-standing links: keep URL UR(L) strip trailing punct: URL; URL) UR(L))
2012-06-07 02:00:00 +02:00
let g :vimwiki_rxWeblink0 = g :vimwiki_rxWeblink
" 0a) match URL within URL
let g :vimwiki_rxWeblinkMatchUrl0 = g :vimwiki_rxWeblinkMatchUrl
" 0b) match DESCRIPTION within URL
let g :vimwiki_rxWeblinkMatchDescr0 = g :vimwiki_rxWeblinkMatchDescr
" }}}
" LINKS: Setup weblink1 regexps {{{
let g :vimwiki_rxWeblink1Prefix = '['
let g :vimwiki_rxWeblink1Suffix = ')'
let g :vimwiki_rxWeblink1Separator = ']('
" [DESCRIPTION](URL)
2013-04-19 05:46:58 +02:00
let g :vimwiki_Weblink1Template = g :vimwiki_rxWeblink1Prefix . '__LinkDescription__' .
2012-06-07 02:00:00 +02:00
\ g :vimwiki_rxWeblink1Separator . '__LinkUrl__' .
\ g :vimwiki_rxWeblink1Suffix
2014-02-24 12:16:23 +01:00
let s :valid_chars = '[^\\]'
2012-06-07 02:00:00 +02:00
2013-07-08 11:37:35 +02:00
let g :vimwiki_rxWeblink1Prefix = vimwiki #u #escape ( g :vimwiki_rxWeblink1Prefix )
let g :vimwiki_rxWeblink1Suffix = vimwiki #u #escape ( g :vimwiki_rxWeblink1Suffix )
let g :vimwiki_rxWeblink1Separator = vimwiki #u #escape ( g :vimwiki_rxWeblink1Separator )
2014-02-24 12:16:23 +01:00
let g :vimwiki_rxWeblink1Url = s :valid_chars .'\{-}'
let g :vimwiki_rxWeblink1Descr = s :valid_chars .'\{-}'
2012-06-07 02:00:00 +02:00
"
2013-04-19 05:46:58 +02:00
" " 2012-02-04 TODO not starting with [[ or ][ ? ... prefix = '[\[\]]\@<!\['
2012-06-07 02:00:00 +02:00
" 1. [DESCRIPTION](URL)
" 1a) match [DESCRIPTION](URL)
let g :vimwiki_rxWeblink1 = g :vimwiki_rxWeblink1Prefix .
\ g :vimwiki_rxWeblink1Url .g :vimwiki_rxWeblink1Separator .
\ g :vimwiki_rxWeblink1Descr .g :vimwiki_rxWeblink1Suffix
" 1b) match URL within [DESCRIPTION](URL)
let g :vimwiki_rxWeblink1MatchUrl = g :vimwiki_rxWeblink1Prefix .
\ g :vimwiki_rxWeblink1Descr . g :vimwiki_rxWeblink1Separator .
\ '\zs' .g :vimwiki_rxWeblink1Url .'\ze' . g :vimwiki_rxWeblink1Suffix
" 1c) match DESCRIPTION within [DESCRIPTION](URL)
let g :vimwiki_rxWeblink1MatchDescr = g :vimwiki_rxWeblink1Prefix .
\ '\zs' .g :vimwiki_rxWeblink1Descr .'\ze' . g :vimwiki_rxWeblink1Separator .
\ g :vimwiki_rxWeblink1Url . g :vimwiki_rxWeblink1Suffix
" }}}
" Syntax helper {{{
" TODO: image links too !!
" let g:vimwiki_rxWeblink1Prefix1 = '!\?'. g:vimwiki_rxWeblink1Prefix
let g :vimwiki_rxWeblink1Prefix1 = g :vimwiki_rxWeblink1Prefix
let g :vimwiki_rxWeblink1Suffix1 = g :vimwiki_rxWeblink1Separator .
\ g :vimwiki_rxWeblink1Url .g :vimwiki_rxWeblink1Suffix
" }}}
" *. ANY weblink {{{
" *a) match ANY weblink
let g :vimwiki_rxWeblink = '' .
\ g :vimwiki_rxWeblink1 .'\|' .
\ g :vimwiki_rxWeblink0
" *b) match URL within ANY weblink
let g :vimwiki_rxWeblinkMatchUrl = '' .
\ g :vimwiki_rxWeblink1MatchUrl .'\|' .
\ g :vimwiki_rxWeblinkMatchUrl0
" *c) match DESCRIPTION within ANY weblink
let g :vimwiki_rxWeblinkMatchDescr = '' .
\ g :vimwiki_rxWeblink1MatchDescr .'\|' .
\ g :vimwiki_rxWeblinkMatchDescr0
" }}}
" LINKS: Setup anylink regexps {{{
2013-04-19 05:46:58 +02:00
let g :vimwiki_rxAnyLink = g :vimwiki_rxWikiLink .'\|' .
2012-06-07 02:00:00 +02:00
\ g :vimwiki_rxWikiIncl .'\|' .g :vimwiki_rxWeblink
" }}}
2012-07-07 02:00:00 +02:00
" LINKS: setup wikilink1 reference link definitions {{{
let g :vimwiki_rxMkdRef = '\[' .g :vimwiki_rxWikiLinkDescr .']:\%(\s\+\|\n\)' .
\ g :vimwiki_rxWeblink0
let g :vimwiki_rxMkdRefMatchDescr = '\[\zs' .g :vimwiki_rxWikiLinkDescr .'\ze]:\%(\s\+\|\n\)' .
\ g :vimwiki_rxWeblink0
let g :vimwiki_rxMkdRefMatchUrl = '\[' .g :vimwiki_rxWikiLinkDescr .']:\%(\s\+\|\n\)\zs' .
\ g :vimwiki_rxWeblink0 .'\ze'
" }}}
2012-06-07 02:00:00 +02:00
" }}} end of Links
" LINKS: highlighting is complicated due to "nonexistent" links feature {{{
function ! s :add_target_syntax_ON ( target , type ) " {{{
let prefix0 = 'syntax match ' .a :type .' `'
let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,' .a :type .'Char'
let prefix1 = 'syntax match ' .a :type .'T `'
let suffix1 = '` display contained'
execute prefix0 . a :target . suffix0
execute prefix1 . a :target . suffix1
endfunction "}}}
function ! s :add_target_syntax_OFF ( target , type ) " {{{
let prefix0 = 'syntax match VimwikiNoExistsLink `'
let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,' .a :type .'Char'
let prefix1 = 'syntax match VimwikiNoExistsLinkT `'
let suffix1 = '` display contained'
execute prefix0 . a :target . suffix0
execute prefix1 . a :target . suffix1
endfunction "}}}
function ! s :wrap_wikilink1_rx ( target ) "{{{
return g :vimwiki_rxWikiLink1InvalidPrefix .a :target .
\ g :vimwiki_rxWikiLink1InvalidSuffix
endfunction "}}}
2012-07-07 02:00:00 +02:00
function ! s :existing_mkd_refs ( ) "{{{
call vimwiki #markdown_base #reset_mkd_refs ( )
2014-12-04 21:27:02 +01:00
return keys ( vimwiki #markdown_base #get_reflinks ( ) )
2012-07-07 02:00:00 +02:00
endfunction "}}}
2012-06-07 02:00:00 +02:00
function ! s :highlight_existing_links ( ) "{{{
" Wikilink1
" Conditional highlighting that depends on the existence of a wiki file or
" directory is only available for *schemeless* wiki links
" Links are set up upon BufEnter (see plugin/...)
2014-06-22 17:43:26 +02:00
let safe_links = '\%(' .vimwiki #base #file_pattern ( b :existing_wikifiles ) .
\ '\%(#[^|]*\)\?\|#[^|]*\)'
2012-06-07 02:00:00 +02:00
" Wikilink1 Dirs set up upon BufEnter (see plugin/...)
let safe_dirs = vimwiki #base #file_pattern ( b :existing_wikidirs )
2012-07-07 02:00:00 +02:00
" Ref links are cached
let safe_reflinks = vimwiki #base #file_pattern ( s :existing_mkd_refs ( ) )
2012-06-07 02:00:00 +02:00
2012-07-07 02:00:00 +02:00
" match [URL][]
2014-06-22 16:26:40 +02:00
let target = vimwiki #base #apply_template (
\ vimwiki #u #escape ( g :vimwiki_WikiLink1Template1 ) ,
2012-06-07 02:00:00 +02:00
\ safe_links , g :vimwiki_rxWikiLink1Descr , '' )
call s :add_target_syntax_ON ( s :wrap_wikilink1_rx ( target ) , 'VimwikiWikiLink1' )
" match [DESCRIPTION][URL]
2014-06-22 16:26:40 +02:00
let target = vimwiki #base #apply_template (
\ vimwiki #u #escape ( g :vimwiki_WikiLink1Template2 ) ,
2012-06-07 02:00:00 +02:00
\ safe_links , g :vimwiki_rxWikiLink1Descr , '' )
call s :add_target_syntax_ON ( s :wrap_wikilink1_rx ( target ) , 'VimwikiWikiLink1' )
2012-07-07 02:00:00 +02:00
" match [DIRURL][]
2014-06-22 16:26:40 +02:00
let target = vimwiki #base #apply_template (
\ vimwiki #u #escape ( g :vimwiki_WikiLink1Template1 ) ,
2012-06-07 02:00:00 +02:00
\ safe_dirs , g :vimwiki_rxWikiLink1Descr , '' )
call s :add_target_syntax_ON ( s :wrap_wikilink1_rx ( target ) , 'VimwikiWikiLink1' )
" match [DESCRIPTION][DIRURL]
2014-06-22 16:26:40 +02:00
let target = vimwiki #base #apply_template (
\ vimwiki #u #escape ( g :vimwiki_WikiLink1Template2 ) ,
2012-06-07 02:00:00 +02:00
\ safe_dirs , g :vimwiki_rxWikiLink1Descr , '' )
call s :add_target_syntax_ON ( s :wrap_wikilink1_rx ( target ) , 'VimwikiWikiLink1' )
2012-07-07 02:00:00 +02:00
" match [MKDREF][]
2014-06-22 16:26:40 +02:00
let target = vimwiki #base #apply_template (
\ vimwiki #u #escape ( g :vimwiki_WikiLink1Template1 ) ,
2012-07-07 02:00:00 +02:00
\ safe_reflinks , g :vimwiki_rxWikiLink1Descr , '' )
call s :add_target_syntax_ON ( s :wrap_wikilink1_rx ( target ) , 'VimwikiWikiLink1' )
" match [DESCRIPTION][MKDREF]
2014-06-22 16:26:40 +02:00
let target = vimwiki #base #apply_template (
\ vimwiki #u #escape ( g :vimwiki_WikiLink1Template2 ) ,
2012-07-07 02:00:00 +02:00
\ safe_reflinks , g :vimwiki_rxWikiLink1Descr , '' )
call s :add_target_syntax_ON ( s :wrap_wikilink1_rx ( target ) , 'VimwikiWikiLink1' )
2012-06-07 02:00:00 +02:00
endfunction "}}}
" use max highlighting - could be quite slow if there are too many wikifiles
if VimwikiGet ( 'maxhi' )
" WikiLink
call s :add_target_syntax_OFF ( g :vimwiki_rxWikiLink1 , 'VimwikiWikiLink1' )
" Subsequently, links verified on vimwiki's path are highlighted as existing
2014-03-13 13:21:50 +01:00
let s :time01 = vimwiki #u #time ( g :starttime ) "XXX
2012-06-07 02:00:00 +02:00
call s :highlight_existing_links ( )
2014-03-13 13:21:50 +01:00
let s :time02 = vimwiki #u #time ( g :starttime ) "XXX
2012-06-07 02:00:00 +02:00
else
2014-03-13 13:21:50 +01:00
let s :time01 = vimwiki #u #time ( g :starttime ) "XXX
2012-06-07 02:00:00 +02:00
" Wikilink
call s :add_target_syntax_ON ( g :vimwiki_rxWikiLink1 , 'VimwikiWikiLink1' )
2014-03-13 13:21:50 +01:00
let s :time02 = vimwiki #u #time ( g :starttime ) "XXX
2012-06-07 02:00:00 +02:00
endif
" Weblink
call s :add_target_syntax_ON ( g :vimwiki_rxWeblink1 , 'VimwikiWeblink1' )
" WikiLink
" All remaining schemes are highlighted automatically
2014-02-24 12:16:23 +01:00
let s :rxSchemes = '\%(' .
2013-04-19 05:46:58 +02:00
\ join ( split ( g :vimwiki_schemes , '\s*,\s*' ) , '\|' ) .'\|' .
2012-06-07 02:00:00 +02:00
\ join ( split ( g :vimwiki_web_schemes1 , '\s*,\s*' ) , '\|' ) .
\ '\):'
" a) match [nonwiki-scheme-URL]
2014-06-22 16:26:40 +02:00
let s :target = vimwiki #base #apply_template (
\ vimwiki #u #escape ( g :vimwiki_WikiLink1Template1 ) ,
2014-02-24 12:16:23 +01:00
\ s :rxSchemes .g :vimwiki_rxWikiLink1Url , g :vimwiki_rxWikiLink1Descr , '' )
call s :add_target_syntax_ON ( s :wrap_wikilink1_rx ( s :target ) , 'VimwikiWikiLink1' )
2012-06-07 02:00:00 +02:00
" b) match [DESCRIPTION][nonwiki-scheme-URL]
2014-06-22 16:26:40 +02:00
let s :target = vimwiki #base #apply_template (
\ vimwiki #u #escape ( g :vimwiki_WikiLink1Template2 ) ,
2014-02-24 12:16:23 +01:00
\ s :rxSchemes .g :vimwiki_rxWikiLink1Url , g :vimwiki_rxWikiLink1Descr , '' )
call s :add_target_syntax_ON ( s :wrap_wikilink1_rx ( s :target ) , 'VimwikiWikiLink1' )
2012-06-07 02:00:00 +02:00
" }}}
" generic headers "{{{
" Header levels, 1-6
2014-02-24 12:16:23 +01:00
for s :i in range ( 1 , 6 )
execute 'syntax match VimwikiHeader' .s :i .' /' .g :vimwiki_rxH {s :i }.'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,VimwikiLink,VimwikiWeblink1,VimwikiWikiLink1,@Spell'
2012-06-07 02:00:00 +02:00
endfor
" }}}
" concealed chars " {{{
if exists ( "+conceallevel" )
syntax conceal on
endif
syntax spell toplevel
" VimwikiWikiLink1Char is for syntax markers (and also URL when a description
" is present) and may be concealed
2014-02-24 12:16:23 +01:00
let s :options = ' contained transparent contains=NONE'
2012-06-07 02:00:00 +02:00
" conceal wikilink1
2014-06-22 16:26:40 +02:00
execute 'syn match VimwikiWikiLink1Char /' .s :rx_wikilink_md_prefix .'/' .s :options
execute 'syn match VimwikiWikiLink1Char /' .s :rx_wikilink_md_suffix .'/' .s :options
2014-02-24 12:16:23 +01:00
execute 'syn match VimwikiWikiLink1Char /' .g :vimwiki_rxWikiLink1Prefix1 .'/' .s :options
execute 'syn match VimwikiWikiLink1Char /' .g :vimwiki_rxWikiLink1Suffix1 .'/' .s :options
2012-06-07 02:00:00 +02:00
" conceal weblink1
2014-02-24 12:16:23 +01:00
execute 'syn match VimwikiWeblink1Char "' .g :vimwiki_rxWeblink1Prefix1 .'"' .s :options
execute 'syn match VimwikiWeblink1Char "' .g :vimwiki_rxWeblink1Suffix1 .'"' .s :options
2012-06-07 02:00:00 +02:00
if exists ( "+conceallevel" )
syntax conceal off
endif
" }}}
" non concealed chars " {{{
" }}}
" main syntax groups {{{
" Tables
2013-04-19 05:46:58 +02:00
syntax match VimwikiTableRow /^\s*|.\+|\s*$/
2012-06-07 02:00:00 +02:00
\ transparent contains = VimwikiCellSeparator ,
\ VimwikiLinkT ,
\ VimwikiWeblink1T ,
\ VimwikiWikiLink1T ,
\ VimwikiNoExistsLinkT ,
\ VimwikiEmoticons ,
\ VimwikiTodo ,
\ VimwikiBoldT ,
\ VimwikiItalicT ,
\ VimwikiBoldItalicT ,
\ VimwikiItalicBoldT ,
\ VimwikiDelTextT ,
\ VimwikiSuperScriptT ,
\ VimwikiSubScriptT ,
\ VimwikiCodeT ,
\ VimwikiEqInT ,
\ @Spell
" }}}
" header groups highlighting "{{{
"}}}
2013-04-19 05:46:58 +02:00
" syntax group highlighting "{{{
2012-06-07 02:00:00 +02:00
hi def link VimwikiWeblink1 VimwikiLink
hi def link VimwikiWeblink1T VimwikiLink
hi def link VimwikiWikiLink1 VimwikiLink
hi def link VimwikiWikiLink1T VimwikiLink
"}}}
" EMBEDDED syntax setup "{{{
"}}}
"