aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/c.vim50
-rw-r--r--runtime/syntax/context.vim119
-rw-r--r--runtime/syntax/cpp.vim10
-rw-r--r--runtime/syntax/mp.vim8
-rw-r--r--runtime/syntax/python.vim97
-rw-r--r--runtime/syntax/sh.vim16
-rw-r--r--runtime/syntax/sm.vim10
-rw-r--r--runtime/syntax/synload.vim9
-rw-r--r--runtime/syntax/tags.vim32
-rw-r--r--runtime/syntax/tex.vim82
-rw-r--r--runtime/syntax/vim.vim2
11 files changed, 245 insertions, 190 deletions
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 57d99ab1e9..2b946dd73d 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Jul 07
+" Last Change: 2016 Oct 27
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -358,36 +358,36 @@ if !exists("c_no_c99") " ISO C99
endif
" Accept %: for # (C99)
-syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
-syn match cPreConditMatch display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
+syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
+syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
if !exists("c_no_if0")
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
- syn region cCppOutWrapper start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
- syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
+ syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
+ syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
if !exists("c_no_if0_fold")
- syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
+ syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
else
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
endif
- syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
- syn region cCppInWrapper start="^\s*\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
- syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
+ syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
+ syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
+ syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
if !exists("c_no_if0_fold")
- syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
+ syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
else
- syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
+ syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
endif
- syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
- syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
- syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
+ syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
+ syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
+ syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
endif
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match cIncluded display contained "<[^>]*>"
-syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
+syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
"syn match cLineSkip "\\$"
syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock
-syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
-syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
+syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
+syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
" Highlight User Labels
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
@@ -396,21 +396,21 @@ if s:ft ==# 'c' || exists("cpp_no_cpp11")
endif
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
syn cluster cLabelGroup contains=cUserLabel
-syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup
-syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup
+syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup
+syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup
if s:ft ==# 'cpp'
- syn match cUserCont display "^\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
- syn match cUserCont display ";\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+ syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+ syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
else
- syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
- syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+ syn match cUserCont display "^\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+ syn match cUserCont display ";\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
endif
syn match cUserLabel display "\I\i*" contained
" Avoid recognizing most bitfields as labels
-syn match cBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
-syn match cBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
+syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
+syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
if exists("c_minlines")
let b:c_minlines = c_minlines
diff --git a/runtime/syntax/context.vim b/runtime/syntax/context.vim
index 225cc6efc2..b29f256baa 100644
--- a/runtime/syntax/context.vim
+++ b/runtime/syntax/context.vim
@@ -1,7 +1,8 @@
" Vim syntax file
-" Language: ConTeXt typesetting engine
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-08-10
+" Language: ConTeXt typesetting engine
+" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
+" Former Maintainers: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2016 Oct 16
if exists("b:current_syntax")
finish
@@ -13,65 +14,93 @@ unlet b:current_syntax
let s:cpo_save = &cpo
set cpo&vim
-if !exists('g:context_include')
- let g:context_include = ['mp', 'javascript', 'xml']
+" Dictionary of (filetype, group) pairs to highlight between \startGROUP \stopGROUP.
+let s:context_include = get(b:, 'context_include', get(g:, 'context_include', {'xml': 'XML'}))
+
+" For backward compatibility (g:context_include used to be a List)
+if type(s:context_include) ==# type([])
+ let g:context_metapost = (index(s:context_include, 'mp') != -1)
+ let s:context_include = filter(
+ \ {'c': 'C', 'javascript': 'JS', 'ruby': 'Ruby', 'xml': 'XML'},
+ \ { k,_ -> index(s:context_include, k) != -1 }
+ \ )
endif
+syn iskeyword @,48-57,a-z,A-Z,192-255
+
syn spell toplevel
-syn match contextBlockDelim display '\\\%(start\|stop\)\a\+'
- \ contains=@NoSpell
+" ConTeXt options, i.e., [...] blocks
+syn region contextOptions matchgroup=contextDelimiter start='\[' end=']\|\ze\\stop' skip='\\\[\|\\\]' contains=ALLBUT,contextBeginEndLua,@Spell
+
+" Highlight braces
+syn match contextDelimiter '[{}]'
-syn region contextEscaped display matchgroup=contextPreProc
- \ start='\\type\z(\A\)' end='\z1'
-syn region contextEscaped display matchgroup=contextPreProc
- \ start='\\type\={' end='}'
-syn region contextEscaped display matchgroup=contextPreProc
- \ start='\\type\=<<' end='>>'
+" Comments
+syn match contextComment '\\\@<!\%(\\\\\)*\zs%.*$' display contains=initexTodo
+syn match contextComment '^\s*%[CDM].*$' display contains=initexTodo
+
+syn match contextBlockDelim '\\\%(start\|stop\)\a\+' contains=@NoSpell
+
+syn region contextEscaped matchgroup=contextPreProc start='\\type\%(\s*\|\n\)*\z([^A-Za-z%]\)' end='\z1'
+syn region contextEscaped matchgroup=contextPreProc start='\\type\=\%(\s\|\n\)*{' end='}'
+syn region contextEscaped matchgroup=contextPreProc start='\\type\=\%(\s*\|\n\)*<<' end='>>'
syn region contextEscaped matchgroup=contextPreProc
\ start='\\start\z(\a*\%(typing\|typen\)\)'
\ end='\\stop\z1' contains=plaintexComment keepend
-syn region contextEscaped display matchgroup=contextPreProc
- \ start='\\\h\+Type{' end='}'
-syn region contextEscaped display matchgroup=contextPreProc
- \ start='\\Typed\h\+{' end='}'
+syn region contextEscaped matchgroup=contextPreProc start='\\\h\+Type\%(\s\|\n\)*{' end='}'
+syn region contextEscaped matchgroup=contextPreProc start='\\Typed\h\+\%(\s\|\n\)*{' end='}'
syn match contextBuiltin display contains=@NoSpell
- \ '\\\%(unprotect\|protect\|unexpanded\)'
+ \ '\\\%(unprotect\|protect\|unexpanded\)\>'
-syn match contextPreProc '^\s*\\\%(start\|stop\)\=\%(component\|environment\|project\|product\).*$'
+syn match contextPreProc '^\s*\\\%(start\|stop\)\=\%(component\|environment\|project\|product\)\>'
\ contains=@NoSpell
-if index(g:context_include, 'mp') != -1
+if get(b:, 'context_metapost', get(g:, 'context_metapost', 1))
+ let b:mp_metafun_macros = 1 " Highlight MetaFun keywords
syn include @mpTop syntax/mp.vim
unlet b:current_syntax
- syn region contextMPGraphic transparent matchgroup=contextBlockDelim
- \ start='\\start\z(\a*MPgraphic\|MP\%(page\|inclusions\|run\)\).*'
+ syn region contextMPGraphic matchgroup=contextBlockDelim
+ \ start='\\start\z(MP\%(clip\|code\|definitions\|drawing\|environment\|extensions\|inclusions\|initializations\|page\|\)\)\>.*$'
+ \ end='\\stop\z1'
+ \ contains=@mpTop,@NoSpell
+ syn region contextMPGraphic matchgroup=contextBlockDelim
+ \ start='\\start\z(\%(\%[re]usable\|use\|unique\|static\)MPgraphic\|staticMPfigure\|uniqueMPpagegraphic\)\>.*$'
\ end='\\stop\z1'
- \ contains=@mpTop
+ \ contains=@mpTop,@NoSpell
endif
-" TODO: also need to implement this for \\typeC or something along those
-" lines.
-function! s:include_syntax(name, group)
- if index(g:context_include, a:name) != -1
- execute 'syn include @' . a:name . 'Top' 'syntax/' . a:name . '.vim'
- unlet b:current_syntax
- execute 'syn region context' . a:group . 'Code'
- \ 'transparent matchgroup=contextBlockDelim'
- \ 'start=+\\start' . a:group . '+ end=+\\stop' . a:group . '+'
- \ 'contains=@' . a:name . 'Top'
- endif
-endfunction
-
-call s:include_syntax('c', 'C')
-call s:include_syntax('ruby', 'Ruby')
-call s:include_syntax('javascript', 'JS')
-call s:include_syntax('xml', 'XML')
-
-syn match contextSectioning '\\chapter\>' contains=@NoSpell
-syn match contextSectioning '\\\%(sub\)*section\>' contains=@NoSpell
+if get(b:, 'context_lua', get(g:, 'context_lua', 1))
+ syn include @luaTop syntax/lua.vim
+ unlet b:current_syntax
+
+ syn region contextLuaCode matchgroup=contextBlockDelim
+ \ start='\\startluacode\>'
+ \ end='\\stopluacode\>' keepend
+ \ contains=@luaTop,@NoSpell
+
+ syn match contextDirectLua "\\\%(directlua\|ctxlua\)\>\%(\s*%.*$\)\="
+ \ nextgroup=contextBeginEndLua skipwhite skipempty
+ \ contains=initexComment
+ syn region contextBeginEndLua matchgroup=contextSpecial
+ \ start="{" end="}" skip="\\[{}]"
+ \ contained contains=@luaTop,@NoSpell
+endif
+
+for synname in keys(s:context_include)
+ execute 'syn include @' . synname . 'Top' 'syntax/' . synname . '.vim'
+ unlet b:current_syntax
+ execute 'syn region context' . s:context_include[synname] . 'Code'
+ \ 'matchgroup=contextBlockDelim'
+ \ 'start=+\\start' . s:context_include[synname] . '+'
+ \ 'end=+\\stop' . s:context_include[synname] . '+'
+ \ 'contains=@' . synname . 'Top,@NoSpell'
+endfor
+
+syn match contextSectioning '\\\%(start\|stop\)\=\%(\%(sub\)*section\|\%(sub\)*subject\|chapter\|part\|component\|product\|title\)\>'
+ \ contains=@NoSpell
syn match contextSpecial '\\crlf\>\|\\par\>\|-\{2,3}\||[<>/]\=|'
\ contains=@NoSpell
@@ -92,15 +121,19 @@ syn match contextFont '\\\%(vi\{1,3}\|ix\|xi\{0,2}\)\>'
syn match contextFont '\\\%(tf\|b[si]\|s[cl]\|os\)\%(xx\|[xabcd]\)\=\>'
\ contains=@NoSpell
+hi def link contextOptions Typedef
+hi def link contextComment Comment
hi def link contextBlockDelim Keyword
hi def link contextBuiltin Keyword
hi def link contextDelimiter Delimiter
+hi def link contextEscaped String
hi def link contextPreProc PreProc
hi def link contextSectioning PreProc
hi def link contextSpecial Special
hi def link contextType Type
hi def link contextStyle contextType
hi def link contextFont contextType
+hi def link contextDirectLua Keyword
let b:current_syntax = "context"
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim
index d669206b3e..5a478fb77d 100644
--- a/runtime/syntax/cpp.vim
+++ b/runtime/syntax/cpp.vim
@@ -2,7 +2,7 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
-" Last Change: 2016 Jul 07
+" Last Change: 2016 Oct 28
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -31,7 +31,7 @@ syn keyword cppConstant __cplusplus
" C++ 11 extensions
if !exists("cpp_no_cpp11")
syn keyword cppModifier override final
- syn keyword cppType nullptr_t
+ syn keyword cppType nullptr_t auto
syn keyword cppExceptions noexcept
syn keyword cppStorageClass constexpr decltype thread_local
syn keyword cppConstant nullptr
@@ -46,7 +46,11 @@ endif
" C++ 14 extensions
if !exists("cpp_no_cpp14")
- syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>"
+ syn case ignore
+ syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
+ syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
+ syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
+ syn case match
endif
" The minimum and maximum operators in GNU C++
diff --git a/runtime/syntax/mp.vim b/runtime/syntax/mp.vim
index 95723d0d97..a8fa36fe0a 100644
--- a/runtime/syntax/mp.vim
+++ b/runtime/syntax/mp.vim
@@ -2,7 +2,7 @@
" Language: MetaPost
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com>
-" Last Change: 2016 Oct 01
+" Last Change: 2016 Oct 14
if exists("b:current_syntax")
finish
@@ -233,7 +233,10 @@ if get(g:, "other_mp_macros", 1)
endif
" Up to date as of 23-Sep-2016.
-if get(g:, "mp_metafun_macros", 0)
+if get(b:, 'mp_metafun_macros', get(g:, 'mp_metafun_macros', 0))
+ " Highlight TeX keywords (for use in ConTeXt documents)
+ syn match mpTeXKeyword '\\[a-zA-Z@]\+'
+
" These keywords have been added manually.
syn keyword mpPrimitive runscript
@@ -756,6 +759,7 @@ hi def link mpVariable mfVariable
hi def link mpConstant mfConstant
hi def link mpOnOff mpPrimitive
hi def link mpDash mpPrimitive
+hi def link mpTeXKeyword Identifier
let b:current_syntax = "mp"
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index f258184b52..5aec2fe3d2 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
-" Last Change: 2016 Sep 14
+" Last Change: 2016 Oct 29
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@@ -46,6 +46,29 @@ endif
let s:cpo_save = &cpo
set cpo&vim
+if exists("python_no_doctest_highlight")
+ let python_no_doctest_code_highlight = 1
+endif
+
+if exists("python_highlight_all")
+ if exists("python_no_builtin_highlight")
+ unlet python_no_builtin_highlight
+ endif
+ if exists("python_no_doctest_code_highlight")
+ unlet python_no_doctest_code_highlight
+ endif
+ if exists("python_no_doctest_highlight")
+ unlet python_no_doctest_highlight
+ endif
+ if exists("python_no_exception_highlight")
+ unlet python_no_exception_highlight
+ endif
+ if exists("python_no_number_highlight")
+ unlet python_no_number_highlight
+ endif
+ let python_space_error_highlight = 1
+endif
+
" Keep Python keywords in alphabetical order inside groups for easy
" comparison with the table in the 'Python Language Reference'
" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
@@ -81,30 +104,31 @@ syn keyword pythonInclude from import
syn keyword pythonAsync async await
" Decorators (new in Python 2.4)
-" Python 3.5 introduced the use of the same symbol for matrix
-" multiplication. We now have to exclude the symbol from being
-" highlighted when used in that context. Hence, the check that it's
-" preceded by empty space only (possibly in a docstring/doctest) and
-" followed by decorator name, optional parenthesized list of arguments,
-" and the next line with either def, class, or another decorator.
-syn match pythonDecorator
- \ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
- \ display nextgroup=pythonDecoratorName skipwhite
-
" A dot must be allowed because of @MyClass.myfunc decorators.
-" It must be preceded by a decorator symbol and on a separate line from
-" a function/class it decorates.
-syn match pythonDecoratorName
- \ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\)\@="
- \ contained display nextgroup=pythonFunction skipnl
+syn match pythonDecorator "@" display contained
+syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator
+
+" Python 3.5 introduced the use of the same symbol for matrix multiplication:
+" https://www.python.org/dev/peps/pep-0465/. We now have to exclude the
+" symbol from highlighting when used in that context.
+" Single line multiplication.
+syn match pythonMatrixMultiply
+ \ "\%(\w\|[])]\)\s*@"
+ \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
+ \ transparent
+" Multiplication continued on the next line after backslash.
+syn match pythonMatrixMultiply
+ \ "[^\\]\\\s*\n\%(\s*\.\.\.\s\)\=\s\+@"
+ \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
+ \ transparent
+" Multiplication in a parenthesized expression over multiple lines with @ at
+" the start of each continued line; very similar to decorators and complex.
+syn match pythonMatrixMultiply
+ \ "^\s*\%(\%(>>>\|\.\.\.\)\s\+\)\=\zs\%(\h\|\%(\h\|[[(]\).\{-}\%(\w\|[])]\)\)\s*\n\%(\s*\.\.\.\s\)\=\s\+@\%(.\{-}\n\%(\s*\.\.\.\s\)\=\s\+@\)*"
+ \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
+ \ transparent
-" The zero-length non-grouping match of def or class before the function
-" name is extremely important in pythonFunction. Without it, everything
-" is interpreted as a function inside the contained environment of
-" doctests.
-syn match pythonFunction
- \ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\%(def\|class\)\s\+\)\@<=\h\w*"
- \ contained
+syn match pythonFunction "\h\w*" display contained
syn match pythonComment "#.*$" contains=pythonTodo,@Spell
syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
@@ -131,25 +155,6 @@ syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
syn match pythonEscape "\\$"
-if exists("python_highlight_all")
- if exists("python_no_builtin_highlight")
- unlet python_no_builtin_highlight
- endif
- if exists("python_no_doctest_code_highlight")
- unlet python_no_doctest_code_highlight
- endif
- if exists("python_no_doctest_highlight")
- unlet python_no_doctest_highlight
- endif
- if exists("python_no_exception_highlight")
- unlet python_no_exception_highlight
- endif
- if exists("python_no_number_highlight")
- unlet python_no_number_highlight
- endif
- let python_space_error_highlight = 1
-endif
-
" It is very important to understand all details before changing the
" regular expressions below or their order.
" The word boundaries are *not* the floating-point number boundaries
@@ -213,7 +218,9 @@ if !exists("python_no_builtin_highlight")
" non-essential built-in functions; Python 2 only
syn keyword pythonBuiltin apply buffer coerce intern
" avoid highlighting attributes as builtins
- syn match pythonAttribute /\.\h\w*/hs=s+1 contains=ALLBUT,pythonBuiltin transparent
+ syn match pythonAttribute /\.\h\w*/hs=s+1
+ \ contains=ALLBUT,pythonBuiltin,pythonFunction,pythonAsync
+ \ transparent
endif
" From the 'Python Library Reference' class hierarchy at the bottom.
@@ -275,7 +282,7 @@ if !exists("python_no_doctest_highlight")
if !exists("python_no_doctest_code_highlight")
syn region pythonDoctest
\ start="^\s*>>>\s" end="^\s*$"
- \ contained contains=ALLBUT,pythonDoctest,@Spell
+ \ contained contains=ALLBUT,pythonDoctest,pythonFunction,@Spell
syn region pythonDoctestValue
\ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$"
\ contained
@@ -287,7 +294,7 @@ if !exists("python_no_doctest_highlight")
endif
" Sync at the beginning of class, function, or method definition.
-syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*("
+syn sync match pythonSync grouphere NONE "^\%(def\|class\)\s\+\h\w*\s*[(:]"
" The default highlight links. Can be overridden later.
hi def link pythonStatement Statement
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 6048aed4ec..2f880bbc12 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Aug 31, 2016
-" Version: 162
+" Last Change: Sep 22, 2016
+" Version: 165
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
@@ -170,7 +170,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
" Touch: {{{1
" =====
- syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd
+ syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd,shDoubleQuote,shSingleQuote,shDeref,shDerefSimple
syn match shTouchCmd '\<touch\>' contained
endif
@@ -220,7 +220,7 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")"
"=======
syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial
syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1
-syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' contained
+syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' contained contains=shDerefSimple,shDeref
syn match shAstQuote contained '\*\ze"' nextgroup=shString
syn match shTestOpr contained '[^-+/%]\zs=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
syn match shTestOpr contained "<=\|>=\|!=\|==\|=\~\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
@@ -355,7 +355,11 @@ syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ e
" Comments: {{{1
"==========
syn cluster shCommentGroup contains=shTodo,@Spell
-syn keyword shTodo contained COMBAK FIXME TODO XXX
+if exists("b:is_bash")
+ syn match shTodo contained "\<\%(COMBAK\|FIXME\|TODO\|XXX\)\ze:\=\>"
+else
+ syn keyword shTodo contained COMBAK FIXME TODO XXX
+endif
syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup
syn match shComment "\s\zs#.*$" contains=@shCommentGroup
syn match shComment contained "#.*$" contains=@shCommentGroup
@@ -381,7 +385,7 @@ ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \
" Here Strings: {{{1
" =============
-" available for: bash; ksh (really should be ksh93 only) but not if it's a posix
+" available for: bash; ksh (really should be ksh93 only) but not if its a posix
if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix"))
syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion
endif
diff --git a/runtime/syntax/sm.vim b/runtime/syntax/sm.vim
index cb01d44bb6..0ecc96875f 100644
--- a/runtime/syntax/sm.vim
+++ b/runtime/syntax/sm.vim
@@ -1,10 +1,9 @@
" Vim syntax file
" Language: sendmail
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Oct 23, 2014
-" Version: 7
+" Last Change: Oct 25, 2016
+" Version: 8
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
-
if exists("b:current_syntax")
finish
endif
@@ -62,10 +61,10 @@ hi def link smClause Special
hi def link smClauseError Error
hi def link smComment Comment
hi def link smDefine Statement
-hi def link smElse Delimiter
+hi def link smElse Delimiter
hi def link smHeader Statement
hi def link smHeaderSep String
-hi def link smMesg Special
+hi def link smMesg Special
hi def link smPrecedence Number
hi def link smRewrite Statement
hi def link smRewriteComment Comment
@@ -76,7 +75,6 @@ hi def link smRuleset Preproc
hi def link smTrusted Special
hi def link smVar String
-
let b:current_syntax = "sm"
" vim: ts=18
diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim
index 6183f33a59..ab918c645b 100644
--- a/runtime/syntax/synload.vim
+++ b/runtime/syntax/synload.vim
@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2012 Sep 25
+" Last Change: 2016 Nov 04
" This file sets up for syntax highlighting.
" It is loaded from "syntax.vim" and "manual.vim".
@@ -69,8 +69,11 @@ au Syntax c,cpp,cs,idl,java,php,datascript
" Source the user-specified syntax highlighting file
-if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
- execute "source " . mysyntaxfile
+if exists("mysyntaxfile")
+ let s:fname = expand(mysyntaxfile)
+ if filereadable(s:fname)
+ execute "source " . fnameescape(s:fname)
+ endif
endif
" Restore 'cpoptions'
diff --git a/runtime/syntax/tags.vim b/runtime/syntax/tags.vim
index 3980f84a30..f34696d4b0 100644
--- a/runtime/syntax/tags.vim
+++ b/runtime/syntax/tags.vim
@@ -1,7 +1,7 @@
" Language: tags
" Maintainer: Charles E. Campbell <NdrOchip@PcampbellAfamily.Mbiz>
-" Last Change: Aug 31, 2016
-" Version: 6
+" Last Change: Oct 26, 2016
+" Version: 7
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS
" quit when a syntax file was already loaded
@@ -9,27 +9,23 @@ if exists("b:current_syntax")
finish
endif
-syn match tagName "^[^\t]\+" skipwhite nextgroup=tagPath
-syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile
+syn match tagName "^[^\t]\+" skipwhite nextgroup=tagPath
+syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile
syn match tagBaseFile "[a-zA-Z_]\+[\.a-zA-Z_0-9]*\t"me=e-1 contained
-syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment
-syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment
-syn match tagComment ";.*$" contained contains=tagField
+syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment
+syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment
+syn match tagComment ";.*$" contained contains=tagField
syn match tagComment "^!_TAG_.*$"
-syn match tagField contained "[a-z]*:"
+syn match tagField contained "[a-z]*:"
" Define the default highlighting.
if !exists("skip_drchip_tags_inits")
-
- hi def link tagBaseFile PreProc
- hi def link tagComment Comment
- hi def link tagDelim Delimiter
- hi def link tagField Number
- hi def link tagName Identifier
- hi def link tagPath PreProc
-
+ hi def link tagBaseFile PreProc
+ hi def link tagComment Comment
+ hi def link tagDelim Delimiter
+ hi def link tagField Number
+ hi def link tagName Identifier
+ hi def link tagPath PreProc
endif
let b:current_syntax = "tags"
-
-" vim: ts=12
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index f4a0875da0..dd6690200f 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
-" Last Change: Aug 31, 2016
-" Version: 100
+" Last Change: Sep 20, 2016
+" Version: 101
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -160,15 +160,17 @@ syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,tex
syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texItalBoldStyle,texNoSpell
if !s:tex_nospell
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
+ syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher
else
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
+ syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
endif
-syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
+syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
if !exists("g:tex_no_math")
- syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
+ syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
syn cluster texMatchGroup add=@texMathZones
syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2
@@ -199,9 +201,13 @@ if s:tex_fast =~# 'm'
if !s:tex_no_error
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
+ syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError
+ syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell
else
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
+ syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup
+ syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup
endif
if !s:tex_nospell
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
@@ -399,7 +405,7 @@ if !exists("g:tex_no_math")
" TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2
" Starred forms are created if starform is true. Starred
" forms have syntax group and synchronization groups with a
- " "S" appended. Handles: cluster, syntax, sync, and hi link.
+ " "S" appended. Handles: cluster, syntax, sync, and highlighting.
fun! TexNewMathZone(sfx,mathzone,starform)
let grpname = "texMathZone".a:sfx
let syncname = "texSyncMathZone".a:sfx
@@ -1262,13 +1268,13 @@ if !exists("skip_tex_syntax_inits")
if !exists("g:tex_no_error")
if !exists("g:tex_no_math")
hi def link texBadMath texError
- hi def link texMathDelimBad texError
+ hi def link texMathDelimBad texError
hi def link texMathError texError
if !b:tex_stylish
- hi def link texOnlyMath texError
+ hi def link texOnlyMath texError
endif
endif
- hi def link texError Error
+ hi def link texError Error
endif
hi texBoldStyle gui=bold cterm=bold
@@ -1277,59 +1283,59 @@ if !exists("skip_tex_syntax_inits")
hi texItalBoldStyle gui=bold,italic cterm=bold,italic
hi def link texCite texRefZone
hi def link texDefCmd texDef
- hi def link texDefName texDef
- hi def link texDocType texCmdName
- hi def link texDocTypeArgs texCmdArgs
+ hi def link texDefName texDef
+ hi def link texDocType texCmdName
+ hi def link texDocTypeArgs texCmdArgs
hi def link texInputFileOpt texCmdArgs
hi def link texInputCurlies texDelimiter
- hi def link texLigature texSpecialChar
+ hi def link texLigature texSpecialChar
if !exists("g:tex_no_math")
hi def link texMathDelimSet1 texMathDelim
hi def link texMathDelimSet2 texMathDelim
hi def link texMathDelimKey texMathDelim
hi def link texMathMatcher texMath
- hi def link texAccent texStatement
+ hi def link texAccent texStatement
hi def link texGreek texStatement
hi def link texSuperscript texStatement
- hi def link texSubscript texStatement
+ hi def link texSubscript texStatement
hi def link texSuperscripts texSuperscript
hi def link texSubscripts texSubscript
- hi def link texMathSymbol texStatement
- hi def link texMathZoneV texMath
- hi def link texMathZoneW texMath
- hi def link texMathZoneX texMath
- hi def link texMathZoneY texMath
- hi def link texMathZoneV texMath
- hi def link texMathZoneZ texMath
+ hi def link texMathSymbol texStatement
+ hi def link texMathZoneV texMath
+ hi def link texMathZoneW texMath
+ hi def link texMathZoneX texMath
+ hi def link texMathZoneY texMath
+ hi def link texMathZoneV texMath
+ hi def link texMathZoneZ texMath
endif
- hi def link texBeginEnd texCmdName
+ hi def link texBeginEnd texCmdName
hi def link texBeginEndName texSection
- hi def link texSpaceCode texStatement
+ hi def link texSpaceCode texStatement
hi def link texStyleStatement texStatement
- hi def link texTypeSize texType
- hi def link texTypeStyle texType
+ hi def link texTypeSize texType
+ hi def link texTypeStyle texType
" Basic TeX highlighting groups
- hi def link texCmdArgs Number
- hi def link texCmdName Statement
- hi def link texComment Comment
- hi def link texDef Statement
- hi def link texDefParm Special
- hi def link texDelimiter Delimiter
+ hi def link texCmdArgs Number
+ hi def link texCmdName Statement
+ hi def link texComment Comment
+ hi def link texDef Statement
+ hi def link texDefParm Special
+ hi def link texDelimiter Delimiter
hi def link texInput Special
- hi def link texInputFile Special
+ hi def link texInputFile Special
hi def link texLength Number
hi def link texMath Special
- hi def link texMathDelim Statement
- hi def link texMathOper Operator
+ hi def link texMathDelim Statement
+ hi def link texMathOper Operator
hi def link texNewCmd Statement
hi def link texNewEnv Statement
hi def link texOption Number
- hi def link texRefZone Special
- hi def link texSection PreCondit
+ hi def link texRefZone Special
+ hi def link texSection PreCondit
hi def link texSpaceCodeChar Special
- hi def link texSpecialChar SpecialChar
- hi def link texStatement Statement
+ hi def link texSpecialChar SpecialChar
+ hi def link texStatement Statement
hi def link texString String
hi def link texTodo Todo
hi def link texType Type
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 650f2e4a7b..49002b9599 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -470,7 +470,7 @@ syn cluster vimFuncBodyList add=vimSynType
syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
-syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
+syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
if has("conceal")
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar
syn match vimSynMtchCchar contained "\S"