runtime(csh,tcsh): Update syntax files

- Adopt csh syntax file.
- Highlight tcsh strings with the String highlight group.
- Fix 'set' command highlighting with trailing comments. See
  https://github.com/vim/vim/pull/19172#issuecomment-3751574224
- Fix whitespace style in MAINTAINERS file

closes: #19191

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Doug Kearns
2026-01-21 20:23:06 +00:00
committed by Christian Brabandt
parent d532b01c36
commit 95bb4ef7d1
7 changed files with 91 additions and 39 deletions
+15 -14
View File
@@ -3,7 +3,7 @@
# You can use github users with @user or email addresses
# These owners will be the default owners for everything in the repo.
#* @brammool
#* @brammool
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
@@ -14,7 +14,7 @@ runtime/autoload/context.vim @lifepillar
runtime/autoload/freebasic.vim @dkearns
runtime/autoload/hare.vim @selenebun
runtime/autoload/hcl.vim @gpanders
runtime/autoload/javascriptcomplete.vim @jsit
runtime/autoload/javascriptcomplete.vim @jsit
runtime/autoload/modula2.vim @dkearns
runtime/autoload/rubycomplete.vim @segfault @dkearns
runtime/autoload/rust.vim @lilyball
@@ -132,7 +132,7 @@ runtime/ftplugin/autohotkey.vim @telemachus
runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/basic.vim @dkearns
runtime/ftplugin/bicep.vim @scottmckendry
runtime/ftplugin/bicep-params.vim @scottmckendry
runtime/ftplugin/bicep-params.vim @scottmckendry
runtime/ftplugin/brighterscript.vim @ribru17
runtime/ftplugin/brightscript.vim @ribru17
runtime/ftplugin/bst.vim @tpope
@@ -224,7 +224,7 @@ runtime/ftplugin/julia.vim @carlobaldassi
runtime/ftplugin/just.vim @pbnj
runtime/ftplugin/kconfig.vim @chrisbra
runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo
runtime/ftplugin/kerml.vim @daumantas-kavolis-sensmetry
runtime/ftplugin/kerml.vim @daumantas-kavolis-sensmetry
runtime/ftplugin/kitty.vim @rivenirvana
runtime/ftplugin/kivy.vim @ribru17
runtime/ftplugin/kotlin.vim @udalov
@@ -236,8 +236,8 @@ runtime/ftplugin/less.vim @genoma
runtime/ftplugin/lex.vim @ribru17
runtime/ftplugin/lf.vim @andis-sprinkis
runtime/ftplugin/liquid.vim @tpope
runtime/ftplugin/logtalk.dict @pmoura
runtime/ftplugin/logtalk.vim @pmoura
runtime/ftplugin/logtalk.dict @pmoura
runtime/ftplugin/logtalk.vim @pmoura
runtime/ftplugin/lua.vim @dkearns
runtime/ftplugin/lynx.vim @dkearns
runtime/ftplugin/m17ndb.vim @dseomn
@@ -247,11 +247,11 @@ runtime/ftplugin/markdown.vim @tpope
runtime/ftplugin/mbsync.vim @fymyte
runtime/ftplugin/mediawiki.vim @avidseeker
runtime/ftplugin/meson.vim @Liambeguin
runtime/ftplugin/mf.vim @lifepillar
runtime/ftplugin/mf.vim @lifepillar
runtime/ftplugin/modula2.vim @dkearns
runtime/ftplugin/modula3.vim @dkearns
runtime/ftplugin/mojo.vim @ribru17
runtime/ftplugin/mp.vim @lifepillar
runtime/ftplugin/mp.vim @lifepillar
runtime/ftplugin/mss.vim @Freed-Wu
runtime/ftplugin/nginx.vim @chr4
runtime/ftplugin/nim.vim @ribru17
@@ -261,7 +261,7 @@ runtime/ftplugin/nu.vim @elkasztano
runtime/ftplugin/octave.vim @dkearns
runtime/ftplugin/ondir.vim @jparise
runtime/ftplugin/opencl.vim @Freed-Wu
runtime/ftplugin/openscad.vim @squibid
runtime/ftplugin/openscad.vim @squibid
runtime/ftplugin/openvpn.vim @ObserverOfTime
runtime/ftplugin/pascal.vim @dkearns
runtime/ftplugin/pbtxt.vim @lakshayg
@@ -315,7 +315,7 @@ runtime/ftplugin/sshdconfig.vim @jiangyinzuo
runtime/ftplugin/svelte.vim @igorlfs
runtime/ftplugin/sway.vim @ribru17
runtime/ftplugin/swayconfig.vim @jamespeapen
runtime/ftplugin/sysml.vim @daumantas-kavolis-sensmetry
runtime/ftplugin/sysml.vim @daumantas-kavolis-sensmetry
runtime/ftplugin/systemverilog.vim @Kocha
runtime/ftplugin/swig.vim @jmarrec
runtime/ftplugin/tap.vim @petdance
@@ -401,10 +401,10 @@ runtime/indent/lua.vim @marcuscf
runtime/indent/m17ndb.vim @dseomn
runtime/indent/make.vim @dkearns
runtime/indent/meson.vim @Liambeguin
runtime/indent/mf.vim @lifepillar
runtime/indent/mf.vim @lifepillar
runtime/indent/mma.vim @dkearns
runtime/indent/mojo.vim @ribru17
runtime/indent/mp.vim @lifepillar
runtime/indent/mp.vim @lifepillar
runtime/indent/nginx.vim @chr4
runtime/indent/nsis.vim @k-takata
runtime/indent/nu.vim @elkasztano
@@ -487,6 +487,7 @@ runtime/syntax/clojure.vim @axvr
runtime/syntax/codeowners.vim @jparise
runtime/syntax/context.vim @lifepillar
runtime/syntax/cs.vim @nickspoons
runtime/syntax/csh.vim @dkearns
runtime/syntax/css.vim @jsit
runtime/syntax/csv.vim @habamax
runtime/syntax/cucumber.vim @tpope
@@ -592,13 +593,13 @@ runtime/syntax/mbsync.vim @fymyte
runtime/syntax/mason.vim @petdance
runtime/syntax/mediawiki.vim @avidseeker
runtime/syntax/meson.vim @Liambeguin
runtime/syntax/mf.vim @lifepillar
runtime/syntax/mf.vim @lifepillar
runtime/syntax/modula2.vim @dkearns
runtime/syntax/modula2/opt/iso.vim @trijezdci
runtime/syntax/modula2/opt/pim.vim @trijezdci
runtime/syntax/modula2/opt/r10.vim @trijezdci
runtime/syntax/modula3.vim @dkearns
runtime/syntax/mp.vim @lifepillar
runtime/syntax/mp.vim @lifepillar
runtime/syntax/mss.vim @Freed-Wu
runtime/syntax/n1ql.vim @pr3d4t0r
runtime/syntax/nginx.vim @chr4
+5 -7
View File
@@ -1,10 +1,8 @@
" Vim syntax file
" Language: C-shell (csh)
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
" Version: 14
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH
" Language: C-shell (csh)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Former Maintainer: Charles E. Campbell
" Last Change: 2026 Jan 16
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -40,7 +38,7 @@ syn region cshDblQuote start=+^"+ skip=+\\\\\|\\"+ end=+"+ contains=cshSpecial
syn region cshSnglQuote start=+^'+ skip=+\\\\\|\\'+ end=+'+ contains=cshNoEndlineSQ,@Spell
syn region cshBckQuote start=+^`+ skip=+\\\\\|\\`+ end=+`+ contains=cshNoEndlineBQ,@Spell
syn cluster cshCommentGroup contains=cshTodo,@Spell
syn match cshComment "#.*$" contains=@cshCommentGroup
syn match cshComment "#.*" contains=@cshCommentGroup
" A bunch of useful csh keywords
syn keyword cshStatement alias end history onintr setenv unalias
+19 -18
View File
@@ -2,7 +2,7 @@
" Language: tcsh scripts
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Gautam Iyer <gi1242+vim@NoSpam.com> where NoSpam=gmail (Original Author)
" Last Change: 2021 Oct 15
" Last Change: 2026 Jan 16
" Description: We break up each statement into a "command" and an "end" part.
" All groups are either a "command" or part of the "end" of a statement (ie
@@ -129,11 +129,12 @@ syn match tcshExprEnd contained '\v.*$'hs=e+1 contains=@tcshConditions
syn match tcshExprEnd contained '\v.{-};'hs=e contains=@tcshConditions
" ----- Comments: ----- {{{1
syn match tcshComment '#\s.*' contains=tcshTodo,tcshCommentTi,@Spell
syn match tcshComment '\v#($|\S.*)' contains=tcshTodo,tcshCommentTi
syn match tcshSharpBang '^#! .*$'
syn match tcshCommentTi contained '\v#\s*\u\w*(\s+\u\w*)*:'hs=s+1 contains=tcshTodo
syn match tcshTodo contained '\v\c<todo>'
syn match tcshSharpBang '\%^#!.*$'
syn match tcshComment '#.*' contains=tcshTodo,@Spell
syn match tcshTodo contained '\v%(^\s*#\s*)@<=\c<%(TODO|FIXME|XXX)>'
" TODO: leading whitespace match is needed to prevent keyword matching
syn match tcshLabel '^\s*\w\+:\ze\s*$'
" ----- Strings ----- {{{1
" Tcsh does not allow \" in strings unless the "backslash_quote" shell
@@ -141,14 +142,14 @@ syn match tcshTodo contained '\v\c<todo>'
" want VIM to assume that no backslash quote constructs exist.
" Backquotes are treated as commands, and are not contained in anything
if exists('tcsh_backslash_quote') && tcsh_backslash_quote == 0
syn region tcshSQuote keepend contained start="\v\\@<!'" end="'"
syn region tcshDQuote keepend contained start='\v\\@<!"' end='"' contains=@tcshVarList,tcshSpecial,@Spell
syn region tcshBQuote keepend start='\v\\@<!`' end='`' contains=@tcshStatements
if get(g:, 'tcsh_backslash_quote', 1)
syn region tcshSQuote contained start="'" skip="\v\\\\|\\'" end="'"
syn region tcshDQuote contained start='"' end='"' contains=@tcshVarList,tcshSpecial,@Spell
syn region tcshBQuote keepend matchgroup=tcshBQuoteGrp start='`' skip='\v\\\\|\\`' end='`' contains=@tcshStatements
else
syn region tcshSQuote contained start="\v\\@<!'" skip="\v\\\\|\\'" end="'"
syn region tcshDQuote contained start='\v\\@<!"' end='"' contains=@tcshVarList,tcshSpecial,@Spell
syn region tcshBQuote keepend matchgroup=tcshBQuoteGrp start='\v\\@<!`' skip='\v\\\\|\\`' end='`' contains=@tcshStatements
syn region tcshSQuote keepend contained start="'" end="'"
syn region tcshDQuote keepend contained start='"' end='"' contains=@tcshVarList,tcshSpecial,@Spell
syn region tcshBQuote keepend start='`' end='`' contains=@tcshStatements
endif
" ----- Variables ----- {{{1
@@ -181,8 +182,8 @@ syn match tcshRedir contained '\v\<|\>\>?\&?!?'
syn match tcshMeta contained '\v[]{}*?[]'
" Here documents (<<)
syn region tcshHereDoc contained matchgroup=tcshShellVar start='\v\<\<\s*\z(\h\w*)' end='^\z1$' contains=@tcshVarList,tcshSpecial
syn region tcshHereDoc contained matchgroup=tcshShellVar start="\v\<\<\s*'\z(\h\w*)'" start='\v\<\<\s*"\z(\h\w*)"$' start='\v\<\<\s*\\\z(\h\w*)$' end='^\z1$'
syn region tcshHereDoc contained matchgroup=tcshShellVar start='\v\<\<\s*\z(\h\w*)' end='^\z1$' contains=@tcshVarList,tcshSpecial fold
syn region tcshHereDoc contained matchgroup=tcshShellVar start="\v\<\<\s*'\z(\h\w*)'" start='\v\<\<\s*"\z(\h\w*)"$' start='\v\<\<\s*\\\z(\h\w*)$' end='^\z1$' fold
" Operators
syn match tcshOperator contained '&&\|!\~\|!=\|<<\|<=\|==\|=\~\|>=\|>>\|\*\|\^\|\~\|||\|!\|%\|&\|+\|-\|/\|<\|>\||'
@@ -226,10 +227,9 @@ hi def link tcshExprVar tcshUsrVar
hi def link tcshExprOp tcshOperator
hi def link tcshExprEnd tcshOperator
hi def link tcshComment Comment
hi def link tcshCommentTi Preproc
hi def link tcshSharpBang tcshCommentTi
hi def link tcshSharpBang PreProc
hi def link tcshTodo Todo
hi def link tcshSQuote Constant
hi def link tcshSQuote String
hi def link tcshDQuote tcshSQuote
hi def link tcshBQuoteGrp Include
hi def link tcshVarError Error
@@ -245,6 +245,7 @@ hi def link tcshOperator Operator
hi def link tcshNumber Number
hi def link tcshArgument Special
hi def link tcshSpecial SpecialChar
hi def link tcshLabel Label
" }}}
let &cpo = s:oldcpo
+20
View File
@@ -0,0 +1,20 @@
>#+0#0000e05#ffffff0| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|9|1|7|2|#|i|s@1|u|e|c|o|m@1|e|n|t|-|3|7|5|1|5|7|4|2@1|4| +0#0000000&@11
@75
|s+0#af5f00255&|e|t| +0#0000000&|s|c|r|i|p|t|_|d|i|r|=|"+0#e000002&@1| +0#0000000&|#+0#0000e05&|c|o|m@1|e|n|t| +0#0000000&@48
|s+0#af5f00255&|e|t| +0#0000000&|s|c|r|i|p|t|_|d|i|r|=|"+0#e000002&@1| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|s|c|r|i|p|t|_|d|i|r|=|"+0#e000002&@1| +0#0000000&|#+0#0000e05&| +0#0000000&@55
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|,|1| @10|A|l@1|
+20
View File
@@ -0,0 +1,20 @@
>#+0#0000e05#ffffff0| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|9|1|7|2|#|i|s@1|u|e|c|o|m@1|e|n|t|-|3|7|5|1|5|7|4|2@1|4| +0#0000000&@11
@75
|s+0#af5f00255&|e|t| +0#0000000&|s|c|r|i|p|t|_|d|i|r|=|"+0#e000002&@1| +0#0000000&|#+0#0000e05&|c|o|m@1|e|n|t| +0#0000000&@48
|s+0#af5f00255&|e|t| +0#0000000&|s|c|r|i|p|t|_|d|i|r|=|"+0#e000002&@1| +0#0000000&@57
|s+0#af5f00255&|e|t| +0#0000000&|s|c|r|i|p|t|_|d|i|r|=|"+0#e000002&@1| +0#0000000&|#+0#0000e05&| +0#0000000&@55
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|,|1| @10|A|l@1|
+6
View File
@@ -0,0 +1,6 @@
# https://github.com/vim/vim/pull/19172#issuecomment-3751574224
set script_dir="" #comment
set script_dir=""
set script_dir="" #
+6
View File
@@ -0,0 +1,6 @@
# https://github.com/vim/vim/pull/19172#issuecomment-3751574224
set script_dir="" #comment
set script_dir=""
set script_dir="" #