summaryrefslogtreecommitdiffstats
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-06-17 15:42:40 +0100
committerBram Moolenaar <Bram@vim.org>2022-06-17 15:42:40 +0100
commitd592deb336523a5448779ee3d4bba80334cff1f7 (patch)
treefd1a7be2485c14e73f73761ee8e895efdf326338 /runtime/syntax
parent616592e0816d2d9f893fcd95e3e1e0fbc5893168 (diff)
Update runtime files
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/coco.vim3
-rw-r--r--runtime/syntax/dirpager.vim2
-rw-r--r--runtime/syntax/dts.vim3
-rw-r--r--runtime/syntax/icon.vim336
-rw-r--r--runtime/syntax/initng.vim1
-rw-r--r--runtime/syntax/ipfilter.vim3
-rw-r--r--runtime/syntax/mupad.vim1
-rw-r--r--runtime/syntax/perl.vim17
-rw-r--r--runtime/syntax/pod.vim2
-rw-r--r--runtime/syntax/sendpr.vim4
-rw-r--r--runtime/syntax/tar.vim2
-rw-r--r--runtime/syntax/trustees.vim4
-rw-r--r--runtime/syntax/vim.vim10
13 files changed, 208 insertions, 180 deletions
diff --git a/runtime/syntax/coco.vim b/runtime/syntax/coco.vim
index ae32348bcb..dc21314e35 100644
--- a/runtime/syntax/coco.vim
+++ b/runtime/syntax/coco.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Coco/R
" Maintainer: Ashish Shukla <wahjava@gmail.com>
-" Last Change: 2007 Aug 10
+" Last Change: 2022 Jun 14
" Remark: Coco/R syntax partially implemented.
" License: Vim license
@@ -30,3 +30,4 @@ hi def link cocoOperator Operator
hi def link cocoProductionCode Statement
hi def link cocoPragma Special
+let b:current_syntax = 'coco'
diff --git a/runtime/syntax/dirpager.vim b/runtime/syntax/dirpager.vim
index 1a60063798..dc8b9867ab 100644
--- a/runtime/syntax/dirpager.vim
+++ b/runtime/syntax/dirpager.vim
@@ -6,7 +6,7 @@
" Description: display directory content inside Vim with syntax
" highlighting
" File: runtime/syntax/dirpager.vim
-" Last Change: 2012 May 19
+" Last Change: 2022 Jun 14
" Modeline: vim: ts=8:sw=2:sts=2:
"
" Credits: dirpager.vim is derived from Nikolai Weibulls dircolors.vim
diff --git a/runtime/syntax/dts.vim b/runtime/syntax/dts.vim
index d75b9c178a..be51ab5b10 100644
--- a/runtime/syntax/dts.vim
+++ b/runtime/syntax/dts.vim
@@ -1,11 +1,12 @@
" Vim syntax file
" Language: dts/dtsi (device tree files)
" Maintainer: Daniel Mack <vim@zonque.org>
-" Last Change: 2021 May 15
+" Last Change: 2022 Jun 14
if exists("b:current_syntax")
finish
endif
+let b:current_syntax = 'dts'
syntax region dtsComment start="/\*" end="\*/"
syntax match dtsReference "&[[:alpha:][:digit:]_]\+"
diff --git a/runtime/syntax/icon.vim b/runtime/syntax/icon.vim
index 179d75cd28..276bb58497 100644
--- a/runtime/syntax/icon.vim
+++ b/runtime/syntax/icon.vim
@@ -1,199 +1,211 @@
" Vim syntax file
-" Language: Icon
-" Maintainer: Wendell Turner <wendell@adsi-m4.com>
-" URL: ftp://ftp.halcyon.com/pub/users/wturner/icon.vim
-" Last Change: 2003 May 11
+" Language: Icon
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Previous Maintainer: Wendell Turner <wendell@adsi-m4.com> (invalid last known address)
+" Last Change: 2022 Jun 16
+" Contributor: eschen@alumni.princeton.edu 2002.09.18
-" quit when a syntax file was already loaded
+" Prelude {{{1
if exists("b:current_syntax")
finish
endif
-syn keyword iconFunction abs acos any args asin atan bal
-syn keyword iconFunction callout center char chdir close collect copy
-syn keyword iconFunction cos cset delay delete detab display dtor
-syn keyword iconFunction entab errorclear exit exp find flush function
-syn keyword iconFunction get getch getche getenv iand icom image
-syn keyword iconFunction insert integer ior ishift ixor kbhit key
-syn keyword iconFunction left list loadfunc log many map match
-syn keyword iconFunction member move name numeric open ord pop
-syn keyword iconFunction pos proc pull push put read reads
-syn keyword iconFunction real remove rename repl reverse right rtod
-syn keyword iconFunction runerr save seek seq set sin sort
-syn keyword iconFunction sortf sqrt stop string system tab table
-syn keyword iconFunction tan trim type upto variable where write writes
-
-" Keywords
-syn match iconKeyword "&allocated"
-syn match iconKeyword "&ascii"
-syn match iconKeyword "&clock"
-syn match iconKeyword "&collections"
-syn match iconKeyword "&cset"
-syn match iconKeyword "&current"
-syn match iconKeyword "&date"
-syn match iconKeyword "&dateline"
-syn match iconKeyword "&digits"
-syn match iconKeyword "&dump"
-syn match iconKeyword "&e"
-syn match iconKeyword "&error"
-syn match iconKeyword "&errornumber"
-syn match iconKeyword "&errortext"
-syn match iconKeyword "&errorvalue"
-syn match iconKeyword "&errout"
-syn match iconKeyword "&fail"
-syn match iconKeyword "&features"
-syn match iconKeyword "&file"
-syn match iconKeyword "&host"
-syn match iconKeyword "&input"
-syn match iconKeyword "&lcase"
-syn match iconKeyword "&letters"
-syn match iconKeyword "&level"
-syn match iconKeyword "&line"
-syn match iconKeyword "&main"
-syn match iconKeyword "&null"
-syn match iconKeyword "&output"
-syn match iconKeyword "&phi"
-syn match iconKeyword "&pi"
-syn match iconKeyword "&pos"
-syn match iconKeyword "&progname"
-syn match iconKeyword "&random"
-syn match iconKeyword "&regions"
-syn match iconKeyword "&source"
-syn match iconKeyword "&storage"
-syn match iconKeyword "&subject"
-syn match iconKeyword "&time"
-syn match iconKeyword "&trace"
-syn match iconKeyword "&ucase"
-syn match iconKeyword "&version"
-
-" Reserved words
-syn keyword iconReserved break by case create default do
-syn keyword iconReserved else end every fail if
-syn keyword iconReserved initial link next not of
-syn keyword iconReserved procedure repeat return suspend
-syn keyword iconReserved then to until while
-
-" Storage class reserved words
-syn keyword iconStorageClass global static local record
-
-syn keyword iconTodo contained TODO FIXME XXX BUG
-
-" String and Character constants
-" Highlight special characters (those which have a backslash) differently
-syn match iconSpecial contained "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^c[a-zA-Z0-9]\|\\$"
-syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconSpecial
-syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconSpecial
-syn match iconCharacter "'[^\\]'"
-
-" not sure about these
-"syn match iconSpecialCharacter "'\\[bdeflnrtv]'"
-"syn match iconSpecialCharacter "'\\\o\{3\}'"
-"syn match iconSpecialCharacter "'\\x\x\{2}'"
-"syn match iconSpecialCharacter "'\\^c\[a-zA-Z0-9]'"
-
-"when wanted, highlight trailing white space
+syn iskeyword @,48-57,_,192-255,&
+
+" Not Top {{{1
+syn cluster iconNotTop contains=iconDocField,iconIncluded,iconStringSpecial,iconTodo,@Spell
+
+" Whitespace errors {{{1
if exists("icon_space_errors")
- syn match iconSpaceError "\s*$"
- syn match iconSpaceError " \+\t"me=e-1
+ if !exists("icon_no_trail_space_error")
+ syn match iconSpaceError "\s\+$" display excludenl
+ endif
+ if !exists("icon_no_tab_space_error")
+ syn match iconSpaceError " \+\t"me=e-1 display
+ endif
endif
-"catch errors caused by wrong parenthesis
-syn cluster iconParenGroup contains=iconParenError,iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField
+" Reserved words {{{1
+syn keyword iconReserved break by case create default do else every fail if
+syn keyword iconReserved initial next not of repeat return suspend then to
+syn keyword iconReserved until while
-syn region iconParen transparent start='(' end=')' contains=ALLBUT,@iconParenGroup
-syn match iconParenError ")"
-syn match iconInParen contained "[{}]"
+syn keyword iconStorageClass global static local record invocable
+syn keyword iconLink link
-syn case ignore
+" Procedure definitions {{{1
+if exists("icon_no_procedure_fold")
+ syn region iconProcedure matchgroup=iconReserved start="\<procedure\>" end="\<end\>" contains=ALLBUT,@iconNotTop
+else
+ syn region iconProcedure matchgroup=iconReserved start="\<procedure\>" end="\<end\>" contains=ALLBUT,@iconNotTop fold
+endif
-"integer number, or floating point number without a dot
-syn match iconNumber "\<\d\+\>"
+" Keywords {{{1
+syn keyword iconKeyword &allocated &ascii &clock &collections &cset &current
+syn keyword iconKeyword &date &dateline &digits &dump &e &error &errornumber
+syn keyword iconKeyword &errortext &errorvalue &errout &fail &features &file
+syn keyword iconKeyword &host &input &lcase &letters &level &line &main &null
+syn keyword iconKeyword &output &phi &pi &pos &progname &random &regions
+syn keyword iconKeyword &source &storage &subject &time &trace &ucase &version
+
+" Graphics keywords
+syn keyword iconKeyword &col &control &interval &ldrag &lpress &lrelease
+syn keyword iconKeyword &mdrag &meta &mpress &mrelease &rdrag &resize &row
+syn keyword iconKeyword &rpress &rrelease &shift &window &x &y
+
+" Functions {{{1
+syn keyword iconFunction abs acos any args asin atan bal callout center char
+syn keyword iconFunction chdir close collect copy cos cset delay delete detab
+syn keyword iconFunction display dtor entab errorclear exit exp find flush
+syn keyword iconFunction function get getch getche getenv iand icom image
+syn keyword iconFunction insert integer ior ishift ixor kbhit key left list
+syn keyword iconFunction loadfunc log many map match member move name numeric
+syn keyword iconFunction open ord pop pos proc pull push put read reads real
+syn keyword iconFunction remove rename repl reverse right rtod runerr save
+syn keyword iconFunction seek self seq serial set sin sort sortf sqrt stop
+syn keyword iconFunction string system tab table tan trim type upto variable
+syn keyword iconFunction where write writes
+
+" Graphics functions
+syn keyword iconFunction Active Alert Bg CenterString Clip Clone Color
+syn keyword iconFunction ColorDialog ColorValue CopyArea Couple DrawArc
+syn keyword iconFunction DrawCircle DrawCurve DrawImage DrawLine DrawPoint
+syn keyword iconFunction DrawPolygon DrawRectangle DrawSegment DrawString
+syn keyword iconFunction Enqueue EraseArea Event Fg FillArc FillCircle
+syn keyword iconFunction FillPolygon FillRectangle Font FreeColor GotoRC
+syn keyword iconFunction GotoXY LeftString Lower NewColor Notice OpenDialog
+syn keyword iconFunction PaletteChars PaletteColor PaletteGrays PaletteKey
+syn keyword iconFunction Pattern Pending Pixel Raise ReadImage RightString
+syn keyword iconFunction SaveDialog SelectDialog Shade TextDialog TextWidth
+syn keyword iconFunction ToggleDialog Uncouple WAttrib WClose WDefault WDelay
+syn keyword iconFunction WDone WFlush WOpen WQuit WRead WReads WriteImage
+syn keyword iconFunction WSync WWrite WWrites
+
+" String and character constants {{{1
+syn match iconStringSpecial "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^[a-zA-Z0-9]" contained
+syn match iconStringSpecial "\\$" contained
+syn match iconStringSpecial "_\ze\s*$" contained
+
+syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconStringSpecial
+syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconStringSpecial
+
+" Bracket errors {{{1
+
+if !exists("icon_no_bracket_errors")
+ " catch errors caused by wrong brackets (ACE 2002.09.18)
+ syn cluster iconBracketGroup contains=iconBracketError,iconIncluded
+ syn region iconBracket start='\[' end='\]' contains=ALLBUT,@iconBracketGroup,@iconNotTop transparent
+ syn match iconBracketError "]"
+
+ "catch errors caused by wrong braces (ACE 2002.09.18)
+ syn cluster iconBraceGroup contains=iconBraceError,iconIncluded
+ syn region iconBrace start='{' end='}' contains=ALLBUT,@iconBraceGroup,@iconNotTop transparent
+ syn match iconBraceError "}"
+
+ "catch errors caused by wrong parenthesis
+ syn cluster iconParenGroup contains=iconParenError,iconIncluded
+ syn region iconParen start='(' end=')' contains=ALLBUT,@iconParenGroup,@iconNotTop transparent
+ syn match iconParenError ")"
+end
+
+" Numbers {{{1
+syn case ignore
-"floating point number, with dot, optional exponent
-syn match iconFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>"
+" integer
+syn match iconInteger "\<\d\+\>"
+syn match iconInteger "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>"
-"floating point number, starting with a dot, optional exponent
-syn match iconFloat "\.\d\+\(e[-+]\=\d\+\)\=\>"
+" real with trailing dot
+syn match iconReal "\<\d\+\."
-"floating point number, without dot, with exponent
-syn match iconFloat "\<\d\+e[-+]\=\d\+\>"
+" real, with dot, optional exponent
+syn match iconReal "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>"
-"radix number
-syn match iconRadix "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>"
+" real, with leading dot, optional exponent
+syn match iconReal "\.\d\+\%(e[-+]\=\d\+\)\=\>"
+" real, without dot, with exponent
+syn match iconReal "\<\d\+e[-+]\=\d\+\>"
-" syn match iconIdentifier "\<[a-z_][a-z0-9_]*\>"
+syn cluster iconNumber contains=iconInteger,iconReal
syn case match
-" Comment
-syn match iconComment "#.*" contains=iconTodo,iconSpaceError
-
-syn region iconPreCondit start="^\s*$\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=iconComment,iconString,iconCharacter,iconNumber,iconCommentError,iconSpaceError
-
-syn region iconIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
-syn match iconIncluded contained "<[^>]*>"
-syn match iconInclude "^\s*$\s*include\>\s*["<]" contains=iconIncluded
-"syn match iconLineSkip "\\$"
-
-syn cluster iconPreProcGroup contains=iconPreCondit,iconIncluded,iconInclude,iconDefine,iconInParen,iconUserLabel
-
-syn region iconDefine start="^\s*$\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@iconPreProcGroup
+" Comments {{{1
+syn keyword iconTodo TODO FIXME XXX BUG contained
+syn match iconComment "#.*" contains=iconTodo,iconSpaceError,@Spell
+syn match iconDocField "^#\s\+\zs\%(File\|Subject\|Authors\=\|Date\|Version\|Links\|Requires\|See also\):" contained
-"wt:syn region iconPreProc "start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" "end="$" contains=ALLBUT,@iconPreProcGroup
-
-" Highlight User Labels
-
-" syn cluster iconMultiGroup contains=iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField
+if exists("icon_no_comment_fold")
+ syn region iconDocumentation start="\%^#\{2,}\%(\n#\+\%(\s\+.*\)\=\)\+" end="^#\+\n\s*$" contains=iconDocField keepend
+else
+ syn region iconMultilineComment start="^\s*#.*\n\%(^\s*#\)\@=" end="^\s*#.*\n\%(^\s*#\)\@!" contains=iconComment keepend fold transparent
+ syn region iconDocumentation start="\%^#\{2,}\%(\n#\)\+" end="^#\+\n\%([^#]\|$\)" contains=iconDocField keepend fold
+endif
+" Preprocessor {{{1
+syn match iconPreInclude '^\s*\zs$\s*include\>\ze\s*"' nextgroup=iconIncluded skipwhite
+syn match iconIncluded '"[^"]\+"' contained
+
+syn region iconPreDefine start="^\s*\zs$\s*\%(define\|undef\)\>" end="$" oneline contains=ALLBUT,@iconPreGroup
+syn region iconPreProc start="^\s*\zs$\s*\%(error\|line\)\>" end="$" oneline contains=ALLBUT,@iconPreGroup
+syn region iconPreConditional start="^\s*\zs$\s*\%(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" end="$" oneline contains=iconComment,iconString,iconCset,iconNumber,iconSpaceError
+
+syn cluster iconPreGroup contains=iconPreCondit,iconPreInclude,iconIncluded,iconPreDefine
+
+syn match iconPreSymbol "_V\d\+"
+syn keyword iconPreSymbol _ACORN _AMIGA _ARM_FUNCTIONS _ASCII _CALLING
+syn keyword iconPreSymbol _CO_EXPRESSIONS _COMPILED _DIRECT_EXECUTION
+syn keyword iconPreSymbol _DOS_FUNCTIONS _EBCDIC _EVENT_MONITOR
+syn keyword iconPreSymbol _EXECUTABLE_IMAGES _EXTERNAL_FUNCTIONS
+syn keyword iconPreSymbol _EXTERNAL_VALUES _INTERPRETED _KEYBOARD_FUNCTIONS
+syn keyword iconPreSymbol _LARGE_INTEGERS _MACINTOSH _MEMORY_MONITOR _MSDOS
+syn keyword iconPreSymbol _MSDOS_386 _MULTIREGION _MULTITASKING _OS2 _PIPES
+syn keyword iconPreSymbol _PORT _PRESENTATION_MGR _RECORD_IO _STRING_INVOKE
+syn keyword iconPreSymbol _SYSTEM_FUNCTION _UNIX _VISUALIZATION _VMS
+syn keyword iconPreSymbol _WINDOW_FUNCTIONS _X_WINDOW_SYSTEM
+
+" Syncing {{{1
if !exists("icon_minlines")
- let icon_minlines = 15
+ let icon_minlines = 250
endif
exec "syn sync ccomment iconComment minlines=" . icon_minlines
-" Define the default highlighting.
-
-" Only when an item doesn't have highlighting
-
-" The default methods for highlighting. Can be overridden later
+" Default Highlighting {{{1
-" hi def link iconSpecialCharacter iconSpecial
+hi def link iconParenError iconError
+hi def link iconBracketError iconError
+hi def link iconBraceError iconError
+hi def link iconSpaceError iconError
+hi def link iconError Error
-hi def link iconOctalError iconError
-hi def link iconParenError iconError
-hi def link iconInParen iconError
-hi def link iconCommentError iconError
-hi def link iconSpaceError iconError
-hi def link iconCommentError iconError
-hi def link iconIncluded iconString
-hi def link iconCommentString iconString
-hi def link iconComment2String iconString
-hi def link iconCommentSkip iconComment
+hi def link iconInteger Number
+hi def link iconReal Float
+hi def link iconString String
+hi def link iconCset String
+hi def link iconStringSpecial SpecialChar
-hi def link iconUserLabel Label
-hi def link iconCharacter Character
-hi def link iconNumber Number
-hi def link iconRadix Number
-hi def link iconFloat Float
-hi def link iconInclude Include
hi def link iconPreProc PreProc
-hi def link iconDefine Macro
-hi def link iconError Error
-hi def link iconStatement Statement
-hi def link iconPreCondit PreCondit
-hi def link iconString String
-hi def link iconCset String
-hi def link iconComment Comment
-hi def link iconSpecial SpecialChar
-hi def link iconTodo Todo
-hi def link iconStorageClass StorageClass
-hi def link iconFunction Statement
-hi def link iconReserved Label
-hi def link iconKeyword Operator
+hi def link iconIncluded iconString
+hi def link iconPreInclude Include
+hi def link iconPreSymbol iconPreProc
+hi def link iconPreDefine Define
+hi def link iconPreConditional PreCondit
-"hi def link iconIdentifier Identifier
+hi def link iconStatement Statement
+hi def link iconStorageClass StorageClass
+hi def link iconFunction Function
+hi def link iconReserved Label
+hi def link iconLink Include
+hi def link iconKeyword Keyword
+hi def link iconComment Comment
+hi def link iconTodo Todo
+hi def link iconDocField SpecialComment
+hi def link iconDocumentation Comment
+" Postscript {{{1
let b:current_syntax = "icon"
+" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:
diff --git a/runtime/syntax/initng.vim b/runtime/syntax/initng.vim
index 5d7685cde1..959c79a176 100644
--- a/runtime/syntax/initng.vim
+++ b/runtime/syntax/initng.vim
@@ -20,7 +20,6 @@ endif
syn case match
let is_bash = 1
-unlet! b:current_syntax
syn include @shTop syntax/sh.vim
syn region initngService matchgroup=initngServiceHeader start="^\s*\(service\|virtual\|daemon\|class\|cron\)\s\+\(\(\w\|[-/*]\)\+\(\s\+:\s\+\(\w\|[-/*]\)\+\)\?\)\s\+{" end="}" contains=@initngServiceCluster
diff --git a/runtime/syntax/ipfilter.vim b/runtime/syntax/ipfilter.vim
index a7b7df2bac..c00762623f 100644
--- a/runtime/syntax/ipfilter.vim
+++ b/runtime/syntax/ipfilter.vim
@@ -1,7 +1,7 @@
" ipfilter syntax file
" Language: ipfilter configuration file
" Maintainer: Hendrik Scholz <hendrik@scholz.net>
-" Last Change: 2005 Jan 27
+" Last Change: 2022 Jun 14
"
" http://www.wormulon.net/files/misc/ipfilter.vim
"
@@ -52,3 +52,4 @@ hi def link IPFNetmask String
hi def link IPFAny Statement
hi def link IPFProto Identifier
+let b:current_syntax = 'ipfilter'
diff --git a/runtime/syntax/mupad.vim b/runtime/syntax/mupad.vim
index 55ea9c4e43..df87ad14fe 100644
--- a/runtime/syntax/mupad.vim
+++ b/runtime/syntax/mupad.vim
@@ -279,5 +279,6 @@ hi def link mupadType Type
hi def link mupadDefine Define
hi def link mupadIdentifier Identifier
+let b:current_syntax = 'mupad'
" TODO More comprehensive listing.
diff --git a/runtime/syntax/perl.vim b/runtime/syntax/perl.vim
index 59611b66a4..73f967a183 100644
--- a/runtime/syntax/perl.vim
+++ b/runtime/syntax/perl.vim
@@ -4,7 +4,7 @@
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)
-" Last Change: 2021 Oct 7
+" Last Change: 2022 Jun 13
" Contributors: Andy Lester <andy@petdance.com>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Lukas Mai <l.mai.web.de>
@@ -442,11 +442,18 @@ syn match perlFormatField "@$" contained
" This problem also exists with empty string delimited heredocs but there's no
" known workaround for that case.
if get(g:, 'perl_fold', 0)
- syntax region perlDATA matchgroup=perlDATAStart start="^__DATA__$" end="VIM_PERL_EOF\%$" contains=perlPOD,@perlDATA fold
- syntax region perlEND matchgroup=perlENDStart start="^__END__$" end="VIM_PERL_EOF\%$" contains=perlPOD,@perlDATA fold
+ syntax region perlDATA matchgroup=perlDATAStart start="^__DATA__$" end="VIM_PERL_EOF\%$" contains=@perlDATA fold
+ syntax region perlEND matchgroup=perlENDStart start="^__END__$" end="VIM_PERL_EOF\%$" contains=@perlDATA fold
else
- syntax region perlDATA matchgroup=perlDATAStart start="^__DATA__$" end="\%$" contains=perlPOD,@perlDATA
- syntax region perlEND matchgroup=perlENDStart start="^__END__$" end="\%$" contains=perlPOD,@perlDATA
+ syntax region perlDATA matchgroup=perlDATAStart start="^__DATA__$" end="\%$" contains=@perlDATA
+ syntax region perlEND matchgroup=perlENDStart start="^__END__$" end="\%$" contains=@perlDATA
+endif
+
+" TODO: generalise this to allow other filetypes
+if get(g:, 'perl_highlight_data', 0)
+ syn cluster perlDATA add=perlPOD
+else
+ syn cluster perlDATA remove=perlPOD
endif
"
diff --git a/runtime/syntax/pod.vim b/runtime/syntax/pod.vim
index 44439cb2cd..90c9b99a3e 100644
--- a/runtime/syntax/pod.vim
+++ b/runtime/syntax/pod.vim
@@ -5,7 +5,7 @@
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)
-" Last Change: 2021 Oct 8
+" Last Change: 2022 Jun 13
" To add embedded POD documentation highlighting to your syntax file, add
" the commands:
diff --git a/runtime/syntax/sendpr.vim b/runtime/syntax/sendpr.vim
index 2e07802047..2541b95c67 100644
--- a/runtime/syntax/sendpr.vim
+++ b/runtime/syntax/sendpr.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: FreeBSD send-pr file
" Maintainer: Hendrik Scholz <hendrik@scholz.net>
-" Last Change: 2012 Feb 03
+" Last Change: 2022 Jun 14
"
" http://raisdorf.net/files/misc/send-pr.vim
@@ -31,5 +31,7 @@ hi def link sendprType Type
hi def link sendprString String
hi def link sendprLabel Label
+let b:current_syntax = 'sendpr'
+
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/syntax/tar.vim b/runtime/syntax/tar.vim
index 497683a186..815c2219cb 100644
--- a/runtime/syntax/tar.vim
+++ b/runtime/syntax/tar.vim
@@ -14,4 +14,6 @@ hi def link tarComment Comment
hi def link tarFilename Constant
hi def link tarDirectory Type
+let b:current_syntax = 'tar'
+
" vim: ts=8
diff --git a/runtime/syntax/trustees.vim b/runtime/syntax/trustees.vim
index 6c58d3983d..3a7d26e896 100644
--- a/runtime/syntax/trustees.vim
+++ b/runtime/syntax/trustees.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: trustees
" Maintainer: Nima Talebi <nima@it.net.au>
-" Last Change: 2005-10-12
+" Last Change: 2022 Jun 14
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -40,3 +40,5 @@ syntax match tfsRuleWho ~\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\)~ contained contains=tf
highlight link tfsRuleWho Identifier
syntax match tfsRuleWhat ~[RWEBXODCU!]\+~ contained contains=tfsSpecialChar
highlight link tfsRuleWhat Structure
+
+let b:current_syntax = 'trustees'
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 1e9d6e0bb9..4f2d949e0e 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 8.2 script
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
-" Last Change: June 12, 2022
-" Version: 8.2-44
+" Last Change: Jun 16, 20222
+" Version: 8.2-46
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1
@@ -73,7 +73,7 @@ syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNew
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
" Default highlighting groups {{{2
-syn keyword vimHLGroup contained ColorColumn CurSearch Cursor CursorColumn CursorIM CursorLine CursorLineFold CursorLineNr CursorLineSign DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr LineNrAbove LineNrBelow MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC StatusLineTerm TabLine TabLineFill TabLineSel Terminal Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
+syn keyword vimHLGroup contained ColorColumn CurSearch Cursor CursorColumn CursorIM CursorLine CursorLineFold CursorLineNr CursorLineSign DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr LineNrAbove LineNrBelow MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC StatusLineTerm StatusLineTermNC TabLine TabLineFill TabLineSel Terminal Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
syn match vimHLGroup contained "Conceal"
syn case match
@@ -465,8 +465,8 @@ syn case match
" User Function Highlighting: {{{2
" (following Gautam Iyer's suggestion)
" ==========================
-syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimCommand,vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
-syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimCommand,vimNotation
+syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
+syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
syn keyword vimFuncEcho contained ec ech echo
" User Command Highlighting: {{{2