aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/awk.vim134
-rw-r--r--runtime/syntax/dcl.vim6
-rw-r--r--runtime/syntax/debchangelog.vim4
-rw-r--r--runtime/syntax/debsources.vim6
-rw-r--r--runtime/syntax/groovy.vim11
-rw-r--r--runtime/syntax/lisp.vim6
-rw-r--r--runtime/syntax/maple.vim6
-rw-r--r--runtime/syntax/scheme.vim17
-rw-r--r--runtime/syntax/sh.vim66
-rw-r--r--runtime/syntax/tex.vim6
-rw-r--r--runtime/syntax/tidy.vim242
-rw-r--r--runtime/syntax/vim.vim15
12 files changed, 256 insertions, 263 deletions
diff --git a/runtime/syntax/awk.vim b/runtime/syntax/awk.vim
index 40491eea1a..ae0f217580 100644
--- a/runtime/syntax/awk.vim
+++ b/runtime/syntax/awk.vim
@@ -1,15 +1,15 @@
" Vim syntax file
" Language: awk, nawk, gawk, mawk
" Maintainer: Antonio Colombo <azc100@gmail.com>
-" Last Change: 2014 Oct 21
+" Last Change: 2016 Jul 15
-" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
+" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
" The AWK Programming Language, Addison-Wesley, 1988
" GAWK ref. is: Arnold D. Robbins
" Effective AWK Programming, Third Edition, O'Reilly, 2001
" Effective AWK Programming, Fourth Edition, O'Reilly, 2015
-" (also available with the gawk source distribution)
+" (also available and updated with the gawk source distribution)
" MAWK is a "new awk" meaning it implements AWK ref.
" mawk conforms to the Posix 1003.2 (draft 11.3)
@@ -19,11 +19,8 @@
" TODO:
" Dig into the commented out syntax expressions below.
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
-if version < 600
- syn clear
-elseif exists("b:current_syntax")
+" Quit when a syntax file was already loaded
+if exists("b:current_syntax")
finish
endif
@@ -35,13 +32,13 @@ set cpo&vim
syn keyword awkStatement break continue delete exit
syn keyword awkStatement function getline next
syn keyword awkStatement print printf return
-" GAWK ref. Chapter 7
-syn keyword awkStatement nextfile
+" GAWK ref. Chapter 7-9
+syn keyword awkStatement switch nextfile
+syn keyword awkStatement func
"
" GAWK ref. Chapter 9, Functions
-"
" Numeric Functions
-syn keyword awkFunction atan2 cos div exp int log rand sin sqrt srand
+syn keyword awkFunction atan2 cos exp int intdiv log rand sin sqrt srand
" String Manipulation Functions
syn keyword awkFunction asort asort1 gensub gsub index length match
syn keyword awkFunction patsplit split sprintf strtonum sub substr
@@ -52,17 +49,17 @@ syn keyword awkFunction close fflush system
syn keyword awkFunction mktime strftime systime
" Bit Manipulation Functions
syn keyword awkFunction and compl lshift or rshift xor
-" Getting Type Function
-syn keyword awkFunction isarray
+" Getting Type Functions
+syn keyword awkFunction isarray typeof
" String-Translation Functions
syn keyword awkFunction bindtextdomain dcgettext dcngetext
syn keyword awkConditional if else
-syn keyword awkRepeat while for
+syn keyword awkRepeat while for do
-syn keyword awkTodo contained TODO
+syn keyword awkTodo contained TODO
-syn keyword awkPatterns BEGIN END
+syn keyword awkPatterns BEGIN END BEGINFILE ENDFILE
" GAWK ref. Chapter 7
" Built-in Variables That Control awk
@@ -74,20 +71,18 @@ syn keyword awkVariables ARGC ARGV ARGIND ENVIRON ERRNO FILENAME
syn keyword awkVariables FNR NF FUNCTAB NR PROCINFO RLENGTH RSTART
syn keyword awkVariables RT SYMTAB
-syn keyword awkRepeat do
" Octal format character.
syn match awkSpecialCharacter display contained "\\[0-7]\{1,3\}"
-syn keyword awkStatement func nextfile
" Hex format character.
syn match awkSpecialCharacter display contained "\\x[0-9A-Fa-f]\+"
syn match awkFieldVars "\$\d\+"
-"catch errors caused by wrong parenthesis
-syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass
+" catch errors caused by wrong parenthesis
+syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass,awkComment
syn match awkParenError display ")"
-syn match awkInParen display contained "[{}]"
+"syn match awkInParen display contained "[{}]"
" 64 lines for complex &&'s, and ||'s in a big "if"
syn sync ccomment awkParen maxlines=64
@@ -141,7 +136,7 @@ syn match awkExpression "?\|:"
syn keyword awkExpression in
" Boolean Logic (OR, AND, NOT)
-"syn match awkBoolLogic "||\|&&\|\!"
+syn match awkBoolLogic "||\|&&\|\!"
" This is overridden by less-than & greater-than.
" Put this above those to override them.
@@ -171,63 +166,42 @@ syn region awkArray transparent start="\[" end="\]" contains=awkArray,awkArrayE
" (for the few instances where it would be more than "oneline")
syn sync ccomment awkArray maxlines=10
-" define the default highlighting
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_awk_syn_inits")
- if version < 508
- let did_awk_syn_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
-
- HiLink awkConditional Conditional
- HiLink awkFunction Function
- HiLink awkRepeat Repeat
- HiLink awkStatement Statement
-
- HiLink awkString String
- HiLink awkSpecialPrintf Special
- HiLink awkSpecialCharacter Special
-
- HiLink awkSearch String
- HiLink awkBrackets awkRegExp
- HiLink awkBrktRegExp awkNestRegExp
- HiLink awkCharClass awkNestRegExp
- HiLink awkNestRegExp Keyword
- HiLink awkRegExp Special
-
- HiLink awkNumber Number
- HiLink awkFloat Float
-
- HiLink awkFileIO Special
- HiLink awkOperator Special
- HiLink awkExpression Special
- HiLink awkBoolLogic Special
-
- HiLink awkPatterns Special
- HiLink awkVariables Special
- HiLink awkFieldVars Special
-
- HiLink awkLineSkip Special
- HiLink awkSemicolon Special
- HiLink awkComma Special
- "HiLink awkIdentifier Identifier
-
- HiLink awkComment Comment
- HiLink awkTodo Todo
-
- " Change this if you want nested array names to be highlighted.
- HiLink awkArrayArray awkArray
- HiLink awkArrayElement Special
-
- HiLink awkParenError awkError
- HiLink awkInParen awkError
- HiLink awkError Error
-
- delcommand HiLink
-endif
+" Define the default highlighting.
+" Only used when an item doesn't have highlighting yet
+hi def link awkConditional Conditional
+hi def link awkFunction Function
+hi def link awkRepeat Repeat
+hi def link awkStatement Statement
+hi def link awkString String
+hi def link awkSpecialPrintf Special
+hi def link awkSpecialCharacter Special
+hi def link awkSearch String
+hi def link awkBrackets awkRegExp
+hi def link awkBrktRegExp awkNestRegExp
+hi def link awkCharClass awkNestRegExp
+hi def link awkNestRegExp Keyword
+hi def link awkRegExp Special
+hi def link awkNumber Number
+hi def link awkFloat Float
+hi def link awkFileIO Special
+hi def link awkOperator Special
+hi def link awkExpression Special
+hi def link awkBoolLogic Special
+hi def link awkPatterns Special
+hi def link awkVariables Special
+hi def link awkFieldVars Special
+hi def link awkLineSkip Special
+hi def link awkSemicolon Special
+hi def link awkComma Special
+hi def link awkIdentifier Identifier
+hi def link awkComment Comment
+hi def link awkTodo Todo
+" Change this if you want nested array names to be highlighted.
+hi def link awkArrayArray awkArray
+hi def link awkArrayElement Special
+hi def link awkParenError awkError
+hi def link awkInParen awkError
+hi def link awkError Error
let b:current_syntax = "awk"
diff --git a/runtime/syntax/dcl.vim b/runtime/syntax/dcl.vim
index b08adec31d..73bf577e3e 100644
--- a/runtime/syntax/dcl.vim
+++ b/runtime/syntax/dcl.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: DCL (Digital Command Language - vms)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Jan 20, 2016
-" Version: 8
+" Last Change: May 02, 2016
+" Version: 9
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_DCL
" For version 5.x: Clear all syntax items
@@ -13,7 +13,7 @@ elseif exists("b:current_syntax")
finish
endif
-if !has("patch-7.4.1141")
+if !has("patch-7.4.1142")
setlocal iskeyword=$,@,48-57,_
else
syn iskeyword $,@,48-57,_
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index 4f1d6d4b11..d0c658c75e 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2015 Oct 24
+" Last Change: 2016 Apr 24
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim
" Standard syntax initialization
@@ -23,7 +23,7 @@ let binNMU='binary-only=yes'
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
exe 'syn match debchangelogFirstKV contained "; \('.urgency.'\|'.binNMU.'\)"'
exe 'syn match debchangelogOtherKV contained ", \('.urgency.'\|'.binNMU.'\)"'
-syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
+syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index e0c5f4075f..d35e24729d 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2015 Oct 24
+" Last Change: 2016 Apr 24
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
" Standard syntax initialization
@@ -27,7 +27,7 @@ let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
\
- \ 'precise', 'trusty', 'vivid', 'wily', 'xenial', 'devel'
+ \ 'precise', 'trusty', 'wily', 'xenial', 'yakkety', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
@@ -36,7 +36,7 @@ let s:unsupported = [
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'quantal', 'raring', 'saucy',
- \ 'utopic'
+ \ 'utopic', 'vivid'
\ ]
let &cpo=s:cpo
diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim
index 42fcf4abac..dc39677724 100644
--- a/runtime/syntax/groovy.vim
+++ b/runtime/syntax/groovy.vim
@@ -2,9 +2,9 @@
" Language: Groovy
" Original Author: Alessio Pace <billy.corgan@tiscali.it>
" Maintainer: Tobias Rapp <yahuxo@gmx.de>
-" Version: 0.1.14
+" Version: 0.1.16
" URL: http://www.vim.org/scripts/script.php?script_id=945
-" Last Change: 2015 Apr 21
+" Last Change: 2016 May 23
" THE ORIGINAL AUTHOR'S NOTES:
"
@@ -255,8 +255,11 @@ syn region groovyString start=+"+ end=+"+ end=+$+ contains=groovySpeci
syn region groovyString start=+'+ end=+'+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell
syn region groovyString start=+"""+ end=+"""+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr
syn region groovyString start=+'''+ end=+'''+ contains=groovySpecialChar,groovySpecialError,@Spell
-" regex string
-syn region groovyString start='/[^/]' end='/' contains=groovySpecialChar,groovyRegexChar,groovyELExpr
+if exists("groovy_regex_strings")
+ " regex strings interfere with the division operator and thus are disabled
+ " by default
+ syn region groovyString start='/[^/*]' end='/' contains=groovySpecialChar,groovyRegexChar,groovyELExpr
+endif
" syn region groovyELExpr start=+${+ end=+}+ keepend contained
syn match groovyELExpr /\${.\{-}}/ contained
syn match groovyELExpr /\$[a-zA-Z_][a-zA-Z0-9_.]*/ contained
diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim
index f496398d50..a402452389 100644
--- a/runtime/syntax/lisp.vim
+++ b/runtime/syntax/lisp.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Lisp
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Jan 20, 2016
-" Version: 24
+" Last Change: May 02, 2016
+" Version: 25
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP
"
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec
@@ -16,7 +16,7 @@ endif
if exists("g:lisp_isk")
exe "setl isk=".g:lisp_isk
-elseif !has("patch-7.4.1141")
+elseif !has("patch-7.4.1142")
setl isk=38,42,43,45,47-58,60-62,64-90,97-122,_
else
syn iskeyword 38,42,43,45,47-58,60-62,64-90,97-122,_
diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim
index 9a4db26dd8..77b1507b36 100644
--- a/runtime/syntax/maple.vim
+++ b/runtime/syntax/maple.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Maple V (based on release 4)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Jan 20, 2016
-" Version: 12
+" Last Change: May 02, 2016
+" Version: 13
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_MAPLE
"
" Package Function Selection: {{{1
@@ -30,7 +30,7 @@ elseif exists("b:current_syntax")
endif
" Iskeyword Effects: {{{1
-if !has("patch-7.4.1141")
+if !has("patch-7.4.1142")
setl isk=$,48-57,_,a-z,@-Z
else
syn iskeyword $,48-57,_,a-z,@-Z
diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim
index a210b0c720..c59e09cd17 100644
--- a/runtime/syntax/scheme.vim
+++ b/runtime/syntax/scheme.vim
@@ -1,6 +1,6 @@
" Vim syntax file
" Language: Scheme (R5RS + some R6RS extras)
-" Last Change: 2012 May 13
+" Last Change: 2016 May 23
" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
" Original author: Dirk van Deun <dirk@igwe.vub.ac.be>
@@ -245,6 +245,18 @@ if exists("b:is_mzscheme") || exists("is_mzscheme")
syn region schemeUnquote matchgroup=Delimiter start="#,@\[" end="\]" contains=ALL
syn region schemeQuoted matchgroup=Delimiter start="#['`]" end=![ \t()\[\]";]!me=e-1 contains=ALL
syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL
+
+ " Identifiers are very liberal in MzScheme/Racket
+ syn match schemeOther ![^()[\]{}",'`;#|\\ ]\+!
+
+ " Language setting
+ syn match schemeLang "#lang [-+_/A-Za-z0-9]\+\>"
+
+ " Various number forms
+ syn match schemeNumber "[-+]\=[0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\>"
+ syn match schemeNumber "[-+]\=\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>"
+ syn match schemeNumber "[-+]\=[0-9]\+/[0-9]\+\>"
+ syn match schemeNumber "\([-+]\=\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\)\=[-+]\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\=i\>"
endif
@@ -321,6 +333,9 @@ if version >= 508 || !exists("did_scheme_syntax_inits")
HiLink schemeExtSyntax Type
HiLink schemeExtFunc PreProc
+
+ HiLink schemeLang PreProc
+
delcommand HiLink
endif
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 6ef5bf0d16..c51bd9aa45 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: Apr 11, 2016
-" Version: 147
+" Last Change: May 02, 2016
+" Version: 151
" 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)
@@ -18,19 +18,25 @@ endif
" trying to answer the question: which shell is /bin/sh, really?
" If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess.
-if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh")
+if getline(1) =~ '\<ksh$'
+ let b:is_kornshell = 1
+elseif getline(1) =~ '\<bash$'
+ let b:is_bash = 1
+elseif getline(1) =~ '\<dash$'
+ let b:is_posix = 1
+elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh")
let s:shell = ""
if executable("/bin/sh")
let s:shell = resolve("/bin/sh")
elseif executable("/usr/bin/sh")
let s:shell = resolve("/usr/bin/sh")
endif
- if s:shell =~ 'bash$'
- let g:is_bash= 1
- elseif s:shell =~ 'ksh$'
- let g:is_kornshell = 1
+ if s:shell =~ 'ksh$'
+ let b:is_kornshell= 1
+ elseif s:shell =~ 'bash$'
+ let b:is_bash = 1
elseif s:shell =~ 'dash$'
- let g:is_posix = 1
+ let b:is_posix = 1
endif
unlet s:shell
endif
@@ -86,8 +92,12 @@ if g:sh_fold_enabled && &fdm == "manual"
endif
" set up the syntax-highlighting iskeyword
-if has("patch-7.4.1141")
- exe "syn iskeyword ".&iskeyword.",-"
+if has("patch-7.4.1142")
+ if exists("b:is_bash")
+ exe "syn iskeyword ".&iskeyword.",-,:"
+ else
+ exe "syn iskeyword ".&iskeyword.",-"
+ endif
endif
" Set up folding commands for shell {{{1
@@ -140,6 +150,7 @@ syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch
+syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
@@ -213,14 +224,15 @@ 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 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\)\>\|[!<>]"
syn match shTestPattern contained '\w\+'
-syn region shTestDoubleQuote contained start='\%(\%(\\\\\)*\\\)\@<!"' skip=+\\\\\|\\"+ end='"'
+syn region shTestDoubleQuote contained start='\%(\%(\\\\\)*\\\)\@<!"' skip=+\\\\\|\\"+ end='"' contains=shDeref,shDerefSimple,shDerefSpecial
syn match shTestSingleQuote contained '\\.'
syn match shTestSingleQuote contained "'[^']*'"
if exists("b:is_kornshell") || exists("b:is_bash")
- syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\%(\\\\\)*\\$+ end="\]\]" contains=@shTestList,shNoQuote,shComment
+ syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\%(\\\\\)*\\$+ end="\]\]" contains=@shTestList,shAstQuote,shNoQuote,shComment
syn region shDblParen matchgroup=Delimiter start="((" skip=+\%(\\\\\)*\\$+ end="))" contains=@shTestList,shComment
endif
@@ -313,7 +325,9 @@ syn match shSource "^\.\s"
syn match shSource "\s\.\s"
"syn region shColon start="^\s*:" end="$" end="\s#"me=e-2 contains=@shColonList
"syn region shColon start="^\s*\zs:" end="$" end="\s#"me=e-2
-syn match shColon '^\s*\zs:'
+if exists("b:is_kornshell")
+ syn match shColon '^\s*\zs:'
+endif
" String And Character Constants: {{{1
"================================
@@ -404,21 +418,21 @@ if !exists("g:is_posix")
endif
if exists("b:is_bash")
- ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
else
- ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
endif
" Parameter Dereferencing: {{{1
" ========================
if !exists("g:sh_no_error")
- syn match shDerefWordError "[^}$[]" contained
+ syn match shDerefWordError "[^}$[~]" contained
endif
syn match shDerefSimple "\$\%(\k\+\|\d\)"
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
@@ -498,7 +512,7 @@ if exists("b:is_bash")
" bash : ${parameter//pattern}
syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList
- syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shCommandSubList
+ syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shPPSRightList
" bash : ${parameter/#substring/replacement}
syn match shDerefPSR contained '/#' nextgroup=shDerefPSRleft
@@ -567,6 +581,7 @@ syn sync match shWhileSync grouphere shRepeat "\<while\>"
" Default Highlighting: {{{1
" =====================
hi def link shArithRegion shShellVariables
+hi def link shAstQuote shDoubleQuote
hi def link shAtExpr shSetList
hi def link shBeginHere shRedir
hi def link shCaseBar shConditional
@@ -597,7 +612,6 @@ hi def link shEmbeddedEcho shString
hi def link shEscape shCommandSub
hi def link shExDoubleQuote shDoubleQuote
hi def link shExSingleQuote shSingleQuote
-hi def link shFunction Function
hi def link shHereDoc shString
hi def link shHerePayload shHereDoc
hi def link shLoop shStatement
@@ -628,21 +642,17 @@ if exists("b:is_bash")
hi def link bashAdminStatement shStatement
hi def link bashSpecialVariables shShellVariables
hi def link bashStatement shStatement
- hi def link shFunctionParen Delimiter
- hi def link shFunctionDelim Delimiter
hi def link shCharClass shSpecial
endif
if exists("b:is_kornshell")
hi def link kshSpecialVariables shShellVariables
hi def link kshStatement shStatement
- hi def link shFunctionParen Delimiter
endif
if !exists("g:sh_no_error")
hi def link shCaseError Error
hi def link shCondError Error
hi def link shCurlyError Error
- hi def link shDerefError Error
hi def link shDerefOpError Error
hi def link shDerefWordError Error
hi def link shDoError Error
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index d6d5dd81ee..9d91402bc8 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: Apr 11, 2016
-" Version: 94
+" Last Change: May 02, 2016
+" Version: 95
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -133,7 +133,7 @@ endif
" g:tex_isk
if exists("g:tex_isk")
exe "setlocal isk=".g:tex_isk
-elseif !has("patch-7.4.1141")
+elseif !has("patch-7.4.1142")
setl isk=48-57,a-z,A-Z,192-255
else
syn iskeyword 48-57,a-z,A-Z,192-255
diff --git a/runtime/syntax/tidy.vim b/runtime/syntax/tidy.vim
index c24796edd1..6371cb5a86 100644
--- a/runtime/syntax/tidy.vim
+++ b/runtime/syntax/tidy.vim
@@ -1,145 +1,135 @@
" Vim syntax file
" Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2013 June 01
+" Last Change: 2016 Apr 24
if exists("b:current_syntax")
finish
endif
-setlocal iskeyword=@,48-57,-
+let s:cpo_save = &cpo
+set cpo&vim
+
+syn iskeyword @,48-57,-,_
+
+syn case ignore
+syn keyword tidyBoolean contained t[rue] f[alse] y[es] n[o] 1 0
+syn keyword tidyAutoBoolean contained t[rue] f[alse] y[es] n[o] 1 0 auto
+syn case match
+syn keyword tidyDoctype contained html5 omit auto strict loose transitional user
+syn keyword tidyEncoding contained raw ascii latin0 latin1 utf8 iso2022 mac win1252 ibm858 utf16le utf16be utf16 big5 shiftjis
+syn keyword tidyNewline contained LF CRLF CR
+syn match tidyNumber contained "\<\d\+\>"
+syn keyword tidyRepeat contained keep-first keep-last
+syn keyword tidySorter contained alpha none
+syn region tidyString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline
+syn region tidyString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline
+syn match tidyTags contained "\<\w\+\(\s*,\s*\w\+\)*\>"
+
+syn keyword tidyBooleanOption add-xml-decl add-xml-pi add-xml-space
+ \ anchor-as-name ascii-chars assume-xml-procins bare break-before-br
+ \ clean coerce-endtags decorate-inferred-ul drop-empty-paras
+ \ drop-empty-elements drop-font-tags drop-proprietary-attributes
+ \ enclose-block-text enclose-text escape-cdata escape-scripts
+ \ fix-backslash fix-bad-comments fix-uri force-output gdoc gnu-emacs
+ \ hide-comments hide-endtags indent-attributes indent-cdata
+ \ indent-with-tabs input-xml join-classes join-styles keep-time
+ \ language literal-attributes logical-emphasis lower-literals markup
+ \ merge-emphasis ncr numeric-entities omit-optional-tags output-html
+ \ output-xhtml output-xml preserve-entities punctuation-wrap quiet
+ \ quote-ampersand quote-marks quote-nbsp raw replace-color show-info
+ \ show-warnings skip-nested split strict-tags-attributes tidy-mark
+ \ uppercase-attributes uppercase-tags word-2000 wrap-asp
+ \ wrap-attributes wrap-jste wrap-php wrap-script-literals
+ \ wrap-sections write-back
+ \ contained nextgroup=tidyBooleanDelimiter
+
+syn match tidyBooleanDelimiter ":" nextgroup=tidyBoolean contained skipwhite
+
+syn keyword tidyAutoBooleanOption indent merge-divs merge-spans output-bom show-body-only vertical-space contained nextgroup=tidyAutoBooleanDelimiter
+syn match tidyAutoBooleanDelimiter ":" nextgroup=tidyAutoBoolean contained skipwhite
+
+syn keyword tidyCSSSelectorOption css-prefix contained nextgroup=tidyCSSSelectorDelimiter
+syn match tidyCSSSelectorDelimiter ":" nextgroup=tidyCSSSelector contained skipwhite
+
+syn keyword tidyDoctypeOption doctype contained nextgroup=tidyDoctypeDelimiter
+syn match tidyDoctypeDelimiter ":" nextgroup=tidyDoctype contained skipwhite
+
+syn keyword tidyEncodingOption char-encoding input-encoding output-encoding contained nextgroup=tidyEncodingDelimiter
+syn match tidyEncodingDelimiter ":" nextgroup=tidyEncoding contained skipwhite
+
+syn keyword tidyIntegerOption accessibility-check doctype-mode indent-spaces show-errors tab-size wrap contained nextgroup=tidyIntegerDelimiter
+syn match tidyIntegerDelimiter ":" nextgroup=tidyNumber contained skipwhite
+
+syn keyword tidyNameOption slide-style contained nextgroup=tidyNameDelimiter
+syn match tidyNameDelimiter ":" nextgroup=tidyName contained skipwhite
+
+syn keyword tidyNewlineOption newline contained nextgroup=tidyNewlineDelimiter
+syn match tidyNewlineDelimiter ":" nextgroup=tidyNewline contained skipwhite
+
+syn keyword tidyTagsOption new-blocklevel-tags new-empty-tags new-inline-tags new-pre-tags contained nextgroup=tidyTagsDelimiter
+syn match tidyTagsDelimiter ":" nextgroup=tidyTags contained skipwhite
+
+syn keyword tidyRepeatOption repeated-attributes contained nextgroup=tidyRepeatDelimiter
+syn match tidyRepeatDelimiter ":" nextgroup=tidyRepeat contained skipwhite
+
+syn keyword tidySorterOption sort-attributes contained nextgroup=tidySorterDelimiter
+syn match tidySorterDelimiter ":" nextgroup=tidySorter contained skipwhite
+
+syn keyword tidyStringOption alt-text error-file gnu-emacs-file output-file contained nextgroup=tidyStringDelimiter
+syn match tidyStringDelimiter ":" nextgroup=tidyString contained skipwhite
+
+syn cluster tidyOptions contains=tidy.*Option
+
+syn match tidyStart "^" nextgroup=@tidyOptions
syn match tidyComment "^\s*//.*$" contains=tidyTodo
syn match tidyComment "^\s*#.*$" contains=tidyTodo
syn keyword tidyTodo TODO NOTE FIXME XXX contained
-syn match tidyAssignment "^[a-z0-9-]\+:\s*.*$" contains=tidyOption,@tidyValue,tidyDelimiter
-syn match tidyDelimiter ":" contained
+hi def link tidyAutoBooleanOption Identifier
+hi def link tidyBooleanOption Identifier
+hi def link tidyCSSSelectorOption Identifier
+hi def link tidyDoctypeOption Identifier
+hi def link tidyEncodingOption Identifier
+hi def link tidyIntegerOption Identifier
+hi def link tidyNameOption Identifier
+hi def link tidyNewlineOption Identifier
+hi def link tidyTagsOption Identifier
+hi def link tidyRepeatOption Identifier
+hi def link tidySorterOption Identifier
+hi def link tidyStringOption Identifier
-syn match tidyNewTagAssignment "^new-\l\+-tags:\s*.*$" contains=tidyNewTagOption,tidyNewTagDelimiter,tidyNewTagValue,tidyDelimiter
-syn match tidyNewTagDelimiter "," contained
-syn match tidyNewTagValue "\<\w\+\>" contained
+hi def link tidyAutoBooleanDelimiter Special
+hi def link tidyBooleanDelimiter Special
+hi def link tidyCSSSelectorDelimiter Special
+hi def link tidyDoctypeDelimiter Special
+hi def link tidyEncodingDelimiter Special
+hi def link tidyIntegerDelimiter Special
+hi def link tidyNameDelimiter Special
+hi def link tidyNewlineDelimiter Special
+hi def link tidyTagsDelimiter Special
+hi def link tidyRepeatDelimiter Special
+hi def link tidySorterDelimiter Special
+hi def link tidyStringDelimiter Special
-syn case ignore
-syn keyword tidyBoolean t[rue] f[alse] y[es] n[o] contained
-syn case match
-syn match tidyDoctype "\<\%(omit\|auto\|strict\|loose\|transitional\|user\)\>" contained
-" NOTE: use match rather than keyword here so that tidyEncoding 'raw' does not
-" always have precedence over tidyOption 'raw'
-syn match tidyEncoding "\<\%(ascii\|latin0\|latin1\|raw\|utf8\|iso2022\|mac\|utf16le\|utf16be\|utf16\|win1252\|ibm858\|big5\|shiftjis\)\>" contained
-syn match tidyNewline "\<\%(LF\|CRLF\|CR\)\>"
-syn match tidyNumber "\<\d\+\>" contained
-syn match tidyRepeat "\<\%(keep-first\|keep-last\)\>" contained
-syn region tidyString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
-syn region tidyString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
-syn cluster tidyValue contains=tidyBoolean,tidyDoctype,tidyEncoding,tidyNewline,tidyNumber,tidyRepeat,tidyString
-
-syn match tidyOption "^accessibility-check" contained
-syn match tidyOption "^add-xml-decl" contained
-syn match tidyOption "^add-xml-pi" contained
-syn match tidyOption "^add-xml-space" contained
-syn match tidyOption "^alt-text" contained
-syn match tidyOption "^anchor-as-name" contained
-syn match tidyOption "^ascii-chars" contained
-syn match tidyOption "^assume-xml-procins" contained
-syn match tidyOption "^bare" contained
-syn match tidyOption "^break-before-br" contained
-syn match tidyOption "^char-encoding" contained
-syn match tidyOption "^clean" contained
-syn match tidyOption "^css-prefix" contained
-syn match tidyOption "^decorate-inferred-ul" contained
-syn match tidyOption "^doctype" contained
-syn match tidyOption "^doctype-mode" contained
-syn match tidyOption "^drop-empty-paras" contained
-syn match tidyOption "^drop-font-tags" contained
-syn match tidyOption "^drop-proprietary-attributes" contained
-syn match tidyOption "^enclose-block-text" contained
-syn match tidyOption "^enclose-text" contained
-syn match tidyOption "^error-file" contained
-syn match tidyOption "^escape-cdata" contained
-syn match tidyOption "^fix-backslash" contained
-syn match tidyOption "^fix-bad-comments" contained
-syn match tidyOption "^fix-uri" contained
-syn match tidyOption "^force-output" contained
-syn match tidyOption "^gnu-emacs" contained
-syn match tidyOption "^gnu-emacs-file" contained
-syn match tidyOption "^hide-comments" contained
-syn match tidyOption "^hide-endtags" contained
-syn match tidyOption "^indent" contained
-syn match tidyOption "^indent-attributes" contained
-syn match tidyOption "^indent-cdata" contained
-syn match tidyOption "^indent-spaces" contained
-syn match tidyOption "^input-encoding" contained
-syn match tidyOption "^input-xml" contained
-syn match tidyOption "^join-classes" contained
-syn match tidyOption "^join-styles" contained
-syn match tidyOption "^keep-time" contained
-syn match tidyOption "^language" contained
-syn match tidyOption "^literal-attributes" contained
-syn match tidyOption "^logical-emphasis" contained
-syn match tidyOption "^lower-literals" contained
-syn match tidyOption "^markup" contained
-syn match tidyOption "^merge-divs" contained
-syn match tidyOption "^merge-spans" contained
-syn match tidyOption "^ncr" contained
-syn match tidyOption "^newline" contained
-syn match tidyOption "^numeric-entities" contained
-syn match tidyOption "^output-bom" contained
-syn match tidyOption "^output-encoding" contained
-syn match tidyOption "^output-file" contained
-syn match tidyOption "^output-html" contained
-syn match tidyOption "^output-xhtml" contained
-syn match tidyOption "^output-xml" contained
-syn match tidyOption "^preserve-entities" contained
-syn match tidyOption "^punctuation-wrap" contained
-syn match tidyOption "^quiet" contained
-syn match tidyOption "^quote-ampersand" contained
-syn match tidyOption "^quote-marks" contained
-syn match tidyOption "^quote-nbsp" contained
-syn match tidyOption "^raw" contained
-syn match tidyOption "^repeated-attributes" contained
-syn match tidyOption "^replace-color" contained
-syn match tidyOption "^show-body-only" contained
-syn match tidyOption "^show-errors" contained
-syn match tidyOption "^show-warnings" contained
-syn match tidyOption "^slide-style" contained
-syn match tidyOption "^sort-attributes" contained
-syn match tidyOption "^split" contained
-syn match tidyOption "^tab-size" contained
-syn match tidyOption "^tidy-mark" contained
-syn match tidyOption "^uppercase-attributes" contained
-syn match tidyOption "^uppercase-tags" contained
-syn match tidyOption "^word-2000" contained
-syn match tidyOption "^wrap" contained
-syn match tidyOption "^wrap-asp" contained
-syn match tidyOption "^wrap-attributes" contained
-syn match tidyOption "^wrap-jste" contained
-syn match tidyOption "^wrap-php" contained
-syn match tidyOption "^wrap-script-literals" contained
-syn match tidyOption "^wrap-sections" contained
-syn match tidyOption "^write-back" contained
-syn match tidyOption "^vertical-space" contained
-
-syn match tidyNewTagOption "^new-blocklevel-tags" contained
-syn match tidyNewTagOption "^new-empty-tags" contained
-syn match tidyNewTagOption "^new-inline-tags" contained
-syn match tidyNewTagOption "^new-pre-tags" contained
-
-hi def link tidyBoolean Boolean
-hi def link tidyComment Comment
-hi def link tidyDelimiter Special
-hi def link tidyDoctype Constant
-hi def link tidyEncoding Constant
-hi def link tidyNewline Constant
-hi def link tidyNewTagDelimiter Special
-hi def link tidyNewTagOption Identifier
-hi def link tidyNewTagValue Constant
-hi def link tidyNumber Number
-hi def link tidyOption Identifier
-hi def link tidyRepeat Constant
-hi def link tidyString String
-hi def link tidyTodo Todo
+hi def link tidyAutoBoolean Boolean
+hi def link tidyBoolean Boolean
+hi def link tidyDoctype Constant
+hi def link tidyEncoding Constant
+hi def link tidyNewline Constant
+hi def link tidyTags Constant
+hi def link tidyNumber Number
+hi def link tidyRepeat Constant
+hi def link tidySorter Constant
+hi def link tidyString String
+
+hi def link tidyComment Comment
+hi def link tidyTodo Todo
let b:current_syntax = "tidy"
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
" vim: ts=8
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 34fdae0ffc..32e871ea79 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -39,8 +39,8 @@ syn keyword vimOnlyOption contained nobiosk nobioskey noconsk noconskey nocp noc
" Invertible setting variants
syn keyword vimOnlyOption contained invbiosk invbioskey invconsk invconskey invcp invcompatible invguipty invmacatsui invsn invshortname invta invtextauto invtx invtextmode invtf invttyfast invtbi invttybuiltin invwiv invweirdinvert
" termcap codes (which can also be set) {{{2
-syn keyword vimTermOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
-syn keyword vimTermOption contained t_AF t_AL t_cd t_Ce t_cm t_cs
+syn keyword vimTermOption contained t_8b t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
+syn keyword vimTermOption contained t_8f t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EI
syn match vimTermOption contained "t_%1"
syn match vimTermOption contained "t_#2"
syn match vimTermOption contained "t_#4"
@@ -177,7 +177,7 @@ syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCm
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
else
- syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
+ syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
endif
syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
@@ -285,10 +285,11 @@ syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation
syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
syn cluster vimSubstList add=vimCollection
-syn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[:[:alpha:]]\@!" nextgroup=vimSubstPat
-syn match vimSubst "\%(^\|[^\\]\)s\%[ubstitute][:#[:alpha:]]\@!" nextgroup=vimSubstPat contained
-syn match vimSubst "/\zss\%[ubstitute]\ze/" nextgroup=vimSubstPat
-syn match vimSubst1 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat
+syn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<\%(\<s\%[ubstitute]\>\|\<sm\%[agic]\>\|\<sno\%[magic]\>\)[:#[:alpha:]]\@!" nextgroup=vimSubstPat
+syn match vimSubst "\%(^\|[^\\]\)\<s\%[ubstitute]\>[:#[:alpha:]]\@!" nextgroup=vimSubstPat contained
+syn match vimSubst "/\zs\<s\%[ubstitute]\>\ze/" nextgroup=vimSubstPat
+syn match vimSubst "\(:\+\s*\|^\s*\)s\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat
+syn match vimSubst1 contained "\<s\%[ubstitute]\>" nextgroup=vimSubstPat
syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline
syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline
syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass