aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/c.vim138
-rw-r--r--runtime/syntax/kconfig.vim1392
-rw-r--r--runtime/syntax/netrw.vim148
-rw-r--r--runtime/syntax/sh.vim12
-rw-r--r--runtime/syntax/tex.vim7
-rw-r--r--runtime/syntax/vim.vim42
6 files changed, 854 insertions, 885 deletions
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 30db9438d0..68b6778c73 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
-" Language: C
-" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Language: C
+" Maintainer: The Vim Project <https://github.com/vim/vim>
+" Last Change: 2025 Jan 18
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Quit when a (custom) syntax file was already loaded
@@ -111,6 +111,20 @@ if (s:ft ==# "c" && !exists("c_no_c11")) || (s:in_cpp_family && !exists("cpp_no_
syn match cSpecialCharacter display "[Uu]'\\x\x\+'"
endif
+if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp17"))
+ syn match cCharacter "u8'[^\\]'"
+ syn match cCharacter "u8'[^']*'" contains=cSpecial
+ if exists("c_gnu")
+ syn match cSpecialError "u8'\\[^'\"?\\abefnrtv]'"
+ syn match cSpecialCharacter "u8'\\['\"?\\abefnrtv]'"
+ else
+ syn match cSpecialError "u8'\\[^'\"?\\abfnrtv]'"
+ syn match cSpecialCharacter "u8'\\['\"?\\abfnrtv]'"
+ endif
+ syn match cSpecialCharacter display "u8'\\\o\{1,3}'"
+ syn match cSpecialCharacter display "u8'\\x\x\+'"
+endif
+
"when wanted, highlight trailing white space
if exists("c_space_errors")
if !exists("c_no_trail_space_error")
@@ -191,12 +205,25 @@ syn case ignore
syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal
" Same, but without octal error (for comments)
syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal
-syn match cNumber display contained "\d\+\%(u\=l\{0,2}\|ll\=u\)\>"
-"hex number
-syn match cNumber display contained "0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>"
-" Flag the first zero of an octal number as something special
-syn match cOctal display contained "0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
-syn match cOctalZero display contained "\<0"
+
+" cpp.vim handles these
+if !exists("c_no_c23") && !s:in_cpp_family
+ syn match cNumber display contained "\d\%('\=\d\+\)*\%(u\=l\{0,2}\|ll\=u\|u\=wb\|wbu\=\)\>"
+ "hex number
+ syn match cNumber display contained "0x\x\%('\=\x\+\)*\%(u\=l\{0,2}\|ll\=u\|u\=wb\|wbu\=\)\>"
+ " Flag the first zero of an octal number as something special
+ syn match cOctal display contained "0\o\%('\=\o\+\)*\%(u\=l\{0,2}\|ll\=u\|u\=wb\|wbu\=\)\>" contains=cOctalZero
+ "binary number
+ syn match cNumber display contained "0b[01]\%('\=[01]\+\)*\%(u\=l\{0,2}\|ll\=u\|u\=wb\|wbu\=\)\>"
+else
+ syn match cNumber display contained "\d\+\%(u\=l\{0,2}\|ll\=u\)\>"
+ "hex number
+ syn match cNumber display contained "0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>"
+ " Flag the first zero of an octal number as something special
+ syn match cOctal display contained "0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
+ syn match cOctalZero display contained "\<0"
+endif
+
"floating point number, with dot, optional exponent
syn match cFloat display contained "\d\+\.\d*\%(e[-+]\=\d\+\)\=[fl]\="
"floating point number, starting with a dot, optional exponent
@@ -277,6 +304,13 @@ if !exists("c_no_c99") " ISO C99
syn keyword cType intptr_t uintptr_t
syn keyword cType intmax_t uintmax_t
endif
+if !exists("c_no_c23") && !s:in_cpp_family
+ syn keyword cOperator typeof typeof_unqual
+ syn keyword cType _BitInt _Decimal32 _Decimal64 _Decimal128
+endif
+if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp11"))
+ syn keyword cType nullptr_t
+endif
syn keyword cTypedef typedef
syn keyword cStructure struct union enum
@@ -284,6 +318,9 @@ syn keyword cStorageClass static register auto volatile extern const
if !exists("c_no_c99") && !s:in_cpp_family
syn keyword cStorageClass inline restrict
endif
+if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp11"))
+ syn keyword cStorageClass constexpr
+endif
if !exists("c_no_c11")
syn keyword cStorageClass _Alignas alignas
syn keyword cOperator _Alignof alignof
@@ -312,10 +349,15 @@ if !exists("c_no_c11")
syn keyword cType atomic_intmax_t atomic_uintmax_t
endif
+if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp20"))
+ syn keyword cType char8_t
+endif
+
if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
if exists("c_gnu")
syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__
endif
+ " TODO: __STDC_HOSTED__ is C99 and C++11
syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ __STDC_VERSION__ __STDC_HOSTED__
syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX
syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
@@ -324,6 +366,8 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
if !exists("c_no_c99")
+ syn keyword cConstant __STDC_ISO_10646__ __STDC_IEC_559_COMPLEX__
+ syn keyword cConstant __STDC_MB_MIGHT_NEQ_WC__
syn keyword cConstant __func__ __VA_ARGS__
syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX
syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN
@@ -340,6 +384,26 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX
syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX
endif
+ if !exists("c_no_c11")
+ syn keyword cConstant __STDC_UTF_16__ __STDC_UTF_32__ __STDC_ANALYZABLE__
+ syn keyword cConstant __STDC_LIB_EXT1__ __STDC_NO_ATOMICS__
+ syn keyword cConstant __STDC_NO_COMPLEX__ __STDC_NO_THREADS__
+ syn keyword cConstant __STDC_NO_VLA__
+ endif
+ if !exists("c_no_c23")
+ syn keyword cConstant __STDC_UTF_16__ __STDC_UTF_32__
+ syn keyword cConstant __STDC_EMBED_NOT_FOUND__ __STDC_EMBED_FOUND__
+ syn keyword cConstant __STDC_EMBED_EMPTY__ __STDC_IEC_60559_BFP__
+ syn keyword cConstant __STDC_IEC_60559_DFP__ __STDC_IEC_60559_COMPLEX__
+ syn keyword cConstant __STDC_IEC_60559_TYPES__
+ syn keyword cConstant BITINT_MAXWIDTH
+ endif
+ if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp20"))
+ syn keyword cConstant __VA_OPT__
+ endif
+ if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp11"))
+ syn keyword cConstant nullptr
+ endif
syn keyword cConstant FLT_RADIX FLT_ROUNDS FLT_DIG FLT_MANT_DIG FLT_EPSILON DBL_DIG DBL_MANT_DIG DBL_EPSILON
syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MAX_10_EXP
syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP DBL_MIN_10_EXP DBL_MAX_10_EXP LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP
@@ -377,37 +441,77 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
endif
if !exists("c_no_c99") " ISO C99
syn keyword cConstant true false
+ syn keyword cConstant INFINITY NAN
+ " math.h
+ syn keyword cConstant HUGE_VAL HUGE_VALF HUGE_VALL
+ syn keyword cConstant FP_FAST_FMAF FP_FAST_FMA FP_FAST_FMAL
+ syn keyword cConstant FP_ILOGB0 FP_ILOGBNAN
+ syn keyword cConstant math_errhandling MATH_ERRNO MATH_ERREXCEPT
+ syn keyword cConstant FP_NORMAL FP_SUBNORMAL FP_ZERO FP_INFINITE FP_NAN
endif
" Accept %: for # (C99)
-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 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
+if !exists("c_no_c23")
+ syn region cPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(el\)\=\%(if\|ifdef\|ifndef\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
+else
+ syn region cPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
+endif
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*\zs\%(%:\|#\)\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
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
+ if !exists("c_no_c23")
+ syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|el\%(if\|ifdef\|ifndef\)\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 fold
+ endif
+ else
+ if !exists("c_no_c23")
+ syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|el\%(if\|ifdef\|ifndef\)\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
+ 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
+ endif
+ if !exists("c_no_c23")
+ syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|el\%(if\|ifdef\|ifndef\)\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
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
+ syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
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*\zs\%(%:\|#\)\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
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
+ if !exists("c_no_c23")
+ syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|el\%(if\|ifdef\|ifndef\)\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 fold
+ endif
else
- syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
+ if !exists("c_no_c23")
+ syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|el\%(if\|ifdef\|ifndef\)\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
+ else
+ syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
+ endif
+ endif
+ if !exists("c_no_c23")
+ syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|el\%(if\|ifdef\|ifndef\)\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
+ else
+ syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
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
endif
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match cIncluded display contained "<[^>]*>"
syn match cInclude display "^\s*\zs\%(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
+if !exists("c_no_c23") && !s:in_cpp_family
+ syn region cInclude start="^\s*\zs\%(%:\|#\)\s*embed\>" skip="\\$" end="$" keepend contains=cEmbed,cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
+ syn match cEmbed contained "\%(%:\|#\)\s*embed\>" nextgroup=cIncluded skipwhite transparent
+ syn cluster cPreProcGroup add=cEmbed
+endif
"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*\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
diff --git a/runtime/syntax/kconfig.vim b/runtime/syntax/kconfig.vim
index 0aecc00060..64a47a5995 100644
--- a/runtime/syntax/kconfig.vim
+++ b/runtime/syntax/kconfig.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2024-07-19
+" Latest Revision: 2025 Jan 20
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-kconfig
@@ -12,722 +12,722 @@ endif
let s:cpo_save = &cpo
set cpo&vim
+exe "syn sync minlines=" . get(g:, 'kconfig_minlines', 50)
+
if exists("g:kconfig_syntax_heavy")
-syn match kconfigBegin '^' nextgroup=kconfigKeyword
- \ skipwhite
-
-syn keyword kconfigTodo contained TODO FIXME XXX NOTE
-
-syn match kconfigComment display '#.*$' contains=kconfigTodo
-
-syn keyword kconfigKeyword config nextgroup=kconfigSymbol
- \ skipwhite
-
-syn keyword kconfigKeyword menuconfig nextgroup=kconfigSymbol
- \ skipwhite
-
-syn keyword kconfigKeyword comment menu mainmenu
- \ nextgroup=kconfigKeywordPrompt
- \ skipwhite
-
-syn keyword kconfigKeyword choice
- \ nextgroup=@kconfigConfigOptions
- \ skipwhite skipnl
-
-syn keyword kconfigKeyword endmenu endchoice
-
-syn keyword kconfigPreProc source
- \ nextgroup=kconfigPath
- \ skipwhite
-
-" TODO: This is a hack. The who .*Expr stuff should really be generated so
-" that we can reuse it for various nextgroups.
-syn keyword kconfigConditional if endif
- \ nextgroup=@kconfigConfigOptionIfExpr
- \ skipwhite
-
-syn match kconfigKeywordPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=@kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigPath '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
- \ contained
-
-syn match kconfigSymbol '\<\k\+\>'
- \ contained
- \ nextgroup=@kconfigConfigOptions
- \ skipwhite skipnl
-
-" FIXME: There is – probably – no reason to cluster these instead of just
-" defining them in the same group.
-syn cluster kconfigConfigOptions contains=kconfigTypeDefinition,
- \ kconfigInputPrompt,
- \ kconfigDefaultValue,
- \ kconfigDependencies,
- \ kconfigReverseDependencies,
- \ kconfigNumericalRanges,
- \ kconfigHelpText,
- \ kconfigDefBool,
- \ kconfigOptional
-
-syn keyword kconfigTypeDefinition bool boolean tristate string hex int
- \ contained
- \ nextgroup=kconfigTypeDefPrompt,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigTypeDefPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigTypeDefPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn keyword kconfigInputPrompt prompt
- \ contained
- \ nextgroup=kconfigPromptPrompt
- \ skipwhite
-
-syn match kconfigPromptPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigPromptPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn keyword kconfigDefaultValue default
- \ contained
- \ nextgroup=@kconfigConfigOptionExpr
- \ skipwhite
-
-syn match kconfigDependencies 'depends on\|requires'
- \ contained
- \ nextgroup=@kconfigConfigOptionIfExpr
- \ skipwhite
-
-syn keyword kconfigReverseDependencies select
- \ contained
- \ nextgroup=@kconfigRevDepSymbol
- \ skipwhite
-
-syn cluster kconfigRevDepSymbol contains=kconfigRevDepCSymbol,
- \ kconfigRevDepNCSymbol
-
-syn match kconfigRevDepCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigRevDepCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigRevDepNCSymbol '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn keyword kconfigNumericalRanges range
- \ contained
- \ nextgroup=@kconfigRangeSymbol
- \ skipwhite
-
-syn cluster kconfigRangeSymbol contains=kconfigRangeCSymbol,
- \ kconfigRangeNCSymbol
-
-syn match kconfigRangeCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=@kconfigRangeSymbol2
- \ skipwhite skipnl
-
-syn match kconfigRangeCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=@kconfigRangeSymbol2
- \ skipwhite skipnl
-
-syn match kconfigRangeNCSymbol '\<\k\+\>'
- \ contained
- \ nextgroup=@kconfigRangeSymbol2
- \ skipwhite skipnl
-
-syn cluster kconfigRangeSymbol2 contains=kconfigRangeCSymbol2,
- \ kconfigRangeNCSymbol2
-
-syn match kconfigRangeCSymbol2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigRangeNCSymbol2 '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn region kconfigHelpText contained
- \ matchgroup=kconfigConfigOption
- \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)'
- \ skip='^$'
- \ end='^\z1\@!'
- \ nextgroup=@kconfigConfigOptions
- \ skipwhite skipnl
-
-" XXX: Undocumented
-syn keyword kconfigDefBool def_bool
- \ contained
- \ nextgroup=@kconfigDefBoolSymbol
- \ skipwhite
-
-syn cluster kconfigDefBoolSymbol contains=kconfigDefBoolCSymbol,
- \ kconfigDefBoolNCSymbol
-
-syn match kconfigDefBoolCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigDefBoolCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigDefBoolNCSymbol '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-" XXX: This is actually only a valid option for “choice”, but treating it
-" specially would require a lot of extra groups.
-syn keyword kconfigOptional optional
- \ contained
- \ nextgroup=@kconfigConfigOptions
- \ skipwhite skipnl
-
-syn keyword kconfigConfigOptionIf if
- \ contained
- \ nextgroup=@kconfigConfigOptionIfExpr
- \ skipwhite
-
-syn cluster kconfigConfigOptionIfExpr contains=@kconfigConfOptIfExprSym,
- \ kconfigConfOptIfExprNeg,
- \ kconfigConfOptIfExprGroup
-
-syn cluster kconfigConfOptIfExprSym contains=kconfigConfOptIfExprCSym,
- \ kconfigConfOptIfExprNCSym
-
-syn match kconfigConfOptIfExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=@kconfigConfigOptions,
- \ kconfigConfOptIfExprAnd,
- \ kconfigConfOptIfExprOr,
- \ kconfigConfOptIfExprEq,
- \ kconfigConfOptIfExprNEq
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=@kconfigConfigOptions,
- \ kconfigConfOptIfExprAnd,
- \ kconfigConfOptIfExprOr,
- \ kconfigConfOptIfExprEq,
- \ kconfigConfOptIfExprNEq
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfExprNCSym '\<\k\+\>'
- \ contained
- \ nextgroup=@kconfigConfigOptions,
- \ kconfigConfOptIfExprAnd,
- \ kconfigConfOptIfExprOr,
- \ kconfigConfOptIfExprEq,
- \ kconfigConfOptIfExprNEq
- \ skipwhite skipnl
-
-syn cluster kconfigConfOptIfExprSym2 contains=kconfigConfOptIfExprCSym2,
- \ kconfigConfOptIfExprNCSym2
-
-syn match kconfigConfOptIfExprEq '='
- \ contained
- \ nextgroup=@kconfigConfOptIfExprSym2
- \ skipwhite
-
-syn match kconfigConfOptIfExprNEq '!='
- \ contained
- \ nextgroup=@kconfigConfOptIfExprSym2
- \ skipwhite
-
-syn match kconfigConfOptIfExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=@kconfigConfigOptions,
- \ kconfigConfOptIfExprAnd,
- \ kconfigConfOptIfExprOr
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfExprNCSym2 '\<\k\+\>'
- \ contained
- \ nextgroup=@kconfigConfigOptions,
- \ kconfigConfOptIfExprAnd,
- \ kconfigConfOptIfExprOr
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfExprNeg '!'
- \ contained
- \ nextgroup=@kconfigConfigOptionIfExpr
- \ skipwhite
-
-syn match kconfigConfOptIfExprAnd '&&'
- \ contained
- \ nextgroup=@kconfigConfigOptionIfExpr
- \ skipwhite
-
-syn match kconfigConfOptIfExprOr '||'
- \ contained
- \ nextgroup=@kconfigConfigOptionIfExpr
- \ skipwhite
-
-syn match kconfigConfOptIfExprGroup '('
- \ contained
- \ nextgroup=@kconfigConfigOptionIfGExp
- \ skipwhite
-
-" TODO: hm, this kind of recursion doesn't work right. We need another set of
-" expressions that have kconfigConfigOPtionIfGExp as nextgroup and a matcher
-" for '(' that sets it all off.
-syn cluster kconfigConfigOptionIfGExp contains=@kconfigConfOptIfGExpSym,
- \ kconfigConfOptIfGExpNeg,
- \ kconfigConfOptIfExprGroup
-
-syn cluster kconfigConfOptIfGExpSym contains=kconfigConfOptIfGExpCSym,
- \ kconfigConfOptIfGExpNCSym
-
-syn match kconfigConfOptIfGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=@kconfigConfigIf,
- \ kconfigConfOptIfGExpAnd,
- \ kconfigConfOptIfGExpOr,
- \ kconfigConfOptIfGExpEq,
- \ kconfigConfOptIfGExpNEq
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=@kconfigConfigIf,
- \ kconfigConfOptIfGExpAnd,
- \ kconfigConfOptIfGExpOr,
- \ kconfigConfOptIfGExpEq,
- \ kconfigConfOptIfGExpNEq
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfGExpNCSym '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfOptIfExprGrpE,
- \ kconfigConfOptIfGExpAnd,
- \ kconfigConfOptIfGExpOr,
- \ kconfigConfOptIfGExpEq,
- \ kconfigConfOptIfGExpNEq
- \ skipwhite skipnl
-
-syn cluster kconfigConfOptIfGExpSym2 contains=kconfigConfOptIfGExpCSym2,
- \ kconfigConfOptIfGExpNCSym2
-
-syn match kconfigConfOptIfGExpEq '='
- \ contained
- \ nextgroup=@kconfigConfOptIfGExpSym2
- \ skipwhite
-
-syn match kconfigConfOptIfGExpNEq '!='
- \ contained
- \ nextgroup=@kconfigConfOptIfGExpSym2
- \ skipwhite
-
-syn match kconfigConfOptIfGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfOptIfExprGrpE,
- \ kconfigConfOptIfGExpAnd,
- \ kconfigConfOptIfGExpOr
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfOptIfExprGrpE,
- \ kconfigConfOptIfGExpAnd,
- \ kconfigConfOptIfGExpOr
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfGExpNCSym2 '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfOptIfExprGrpE,
- \ kconfigConfOptIfGExpAnd,
- \ kconfigConfOptIfGExpOr
- \ skipwhite skipnl
-
-syn match kconfigConfOptIfGExpNeg '!'
- \ contained
- \ nextgroup=@kconfigConfigOptionIfGExp
- \ skipwhite
-
-syn match kconfigConfOptIfGExpAnd '&&'
- \ contained
- \ nextgroup=@kconfigConfigOptionIfGExp
- \ skipwhite
-
-syn match kconfigConfOptIfGExpOr '||'
- \ contained
- \ nextgroup=@kconfigConfigOptionIfGExp
- \ skipwhite
-
-syn match kconfigConfOptIfExprGrpE ')'
- \ contained
- \ nextgroup=@kconfigConfigOptions,
- \ kconfigConfOptIfExprAnd,
- \ kconfigConfOptIfExprOr
- \ skipwhite skipnl
-
-
-syn cluster kconfigConfigOptionExpr contains=@kconfigConfOptExprSym,
- \ kconfigConfOptExprNeg,
- \ kconfigConfOptExprGroup
-
-syn cluster kconfigConfOptExprSym contains=kconfigConfOptExprCSym,
- \ kconfigConfOptExprNCSym
-
-syn match kconfigConfOptExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ kconfigConfOptExprAnd,
- \ kconfigConfOptExprOr,
- \ kconfigConfOptExprEq,
- \ kconfigConfOptExprNEq,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigConfOptExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ kconfigConfOptExprAnd,
- \ kconfigConfOptExprOr,
- \ kconfigConfOptExprEq,
- \ kconfigConfOptExprNEq,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigConfOptExprNCSym '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ kconfigConfOptExprAnd,
- \ kconfigConfOptExprOr,
- \ kconfigConfOptExprEq,
- \ kconfigConfOptExprNEq,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn cluster kconfigConfOptExprSym2 contains=kconfigConfOptExprCSym2,
- \ kconfigConfOptExprNCSym2
-
-syn match kconfigConfOptExprEq '='
- \ contained
- \ nextgroup=@kconfigConfOptExprSym2
- \ skipwhite
-
-syn match kconfigConfOptExprNEq '!='
- \ contained
- \ nextgroup=@kconfigConfOptExprSym2
- \ skipwhite
-
-syn match kconfigConfOptExprCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ kconfigConfOptExprAnd,
- \ kconfigConfOptExprOr,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigConfOptExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ kconfigConfOptExprAnd,
- \ kconfigConfOptExprOr,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigConfOptExprNCSym2 '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ kconfigConfOptExprAnd,
- \ kconfigConfOptExprOr,
- \ @kconfigConfigOptions
- \ skipwhite skipnl
-
-syn match kconfigConfOptExprNeg '!'
- \ contained
- \ nextgroup=@kconfigConfigOptionExpr
- \ skipwhite
-
-syn match kconfigConfOptExprAnd '&&'
- \ contained
- \ nextgroup=@kconfigConfigOptionExpr
- \ skipwhite
-
-syn match kconfigConfOptExprOr '||'
- \ contained
- \ nextgroup=@kconfigConfigOptionExpr
- \ skipwhite
-
-syn match kconfigConfOptExprGroup '('
- \ contained
- \ nextgroup=@kconfigConfigOptionGExp
- \ skipwhite
-
-syn cluster kconfigConfigOptionGExp contains=@kconfigConfOptGExpSym,
- \ kconfigConfOptGExpNeg,
- \ kconfigConfOptGExpGroup
-
-syn cluster kconfigConfOptGExpSym contains=kconfigConfOptGExpCSym,
- \ kconfigConfOptGExpNCSym
-
-syn match kconfigConfOptGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfOptExprGrpE,
- \ kconfigConfOptGExpAnd,
- \ kconfigConfOptGExpOr,
- \ kconfigConfOptGExpEq,
- \ kconfigConfOptGExpNEq
- \ skipwhite skipnl
-
-syn match kconfigConfOptGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfOptExprGrpE,
- \ kconfigConfOptGExpAnd,
- \ kconfigConfOptGExpOr,
- \ kconfigConfOptGExpEq,
- \ kconfigConfOptGExpNEq
- \ skipwhite skipnl
-
-syn match kconfigConfOptGExpNCSym '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfOptExprGrpE,
- \ kconfigConfOptGExpAnd,
- \ kconfigConfOptGExpOr,
- \ kconfigConfOptGExpEq,
- \ kconfigConfOptGExpNEq
- \ skipwhite skipnl
-
-syn cluster kconfigConfOptGExpSym2 contains=kconfigConfOptGExpCSym2,
- \ kconfigConfOptGExpNCSym2
-
-syn match kconfigConfOptGExpEq '='
- \ contained
- \ nextgroup=@kconfigConfOptGExpSym2
- \ skipwhite
-
-syn match kconfigConfOptGExpNEq '!='
- \ contained
- \ nextgroup=@kconfigConfOptGExpSym2
- \ skipwhite
-
-syn match kconfigConfOptGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
- \ contained
- \ nextgroup=kconfigConfOptExprGrpE,
- \ kconfigConfOptGExpAnd,
- \ kconfigConfOptGExpOr
- \ skipwhite skipnl
-
-syn match kconfigConfOptGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
- \ contained
- \ nextgroup=kconfigConfOptExprGrpE,
- \ kconfigConfOptGExpAnd,
- \ kconfigConfOptGExpOr
- \ skipwhite skipnl
-
-syn match kconfigConfOptGExpNCSym2 '\<\k\+\>'
- \ contained
- \ nextgroup=kconfigConfOptExprGrpE,
- \ kconfigConfOptGExpAnd,
- \ kconfigConfOptGExpOr
- \ skipwhite skipnl
-
-syn match kconfigConfOptGExpNeg '!'
- \ contained
- \ nextgroup=@kconfigConfigOptionGExp
- \ skipwhite
-
-syn match kconfigConfOptGExpAnd '&&'
- \ contained
- \ nextgroup=@kconfigConfigOptionGExp
- \ skipwhite
-
-syn match kconfigConfOptGExpOr '||'
- \ contained
- \ nextgroup=@kconfigConfigOptionGExp
- \ skipwhite
-
-syn match kconfigConfOptExprGrpE ')'
- \ contained
- \ nextgroup=kconfigConfigOptionIf,
- \ kconfigConfOptExprAnd,
- \ kconfigConfOptExprOr
- \ skipwhite skipnl
-
-syn sync minlines=50
-
-hi def link kconfigTodo Todo
-hi def link kconfigComment Comment
-hi def link kconfigKeyword Keyword
-hi def link kconfigPreProc PreProc
-hi def link kconfigConditional Conditional
-hi def link kconfigPrompt String
-hi def link kconfigKeywordPrompt kconfigPrompt
-hi def link kconfigPath String
-hi def link kconfigSymbol String
-hi def link kconfigConstantSymbol Constant
-hi def link kconfigConfigOption Type
-hi def link kconfigTypeDefinition kconfigConfigOption
-hi def link kconfigTypeDefPrompt kconfigPrompt
-hi def link kconfigInputPrompt kconfigConfigOption
-hi def link kconfigPromptPrompt kconfigPrompt
-hi def link kconfigDefaultValue kconfigConfigOption
-hi def link kconfigDependencies kconfigConfigOption
-hi def link kconfigReverseDependencies kconfigConfigOption
-hi def link kconfigRevDepCSymbol kconfigConstantSymbol
-hi def link kconfigRevDepNCSymbol kconfigSymbol
-hi def link kconfigNumericalRanges kconfigConfigOption
-hi def link kconfigRangeCSymbol kconfigConstantSymbol
-hi def link kconfigRangeNCSymbol kconfigSymbol
-hi def link kconfigRangeCSymbol2 kconfigConstantSymbol
-hi def link kconfigRangeNCSymbol2 kconfigSymbol
-hi def link kconfigHelpText Normal
-hi def link kconfigDefBool kconfigConfigOption
-hi def link kconfigDefBoolCSymbol kconfigConstantSymbol
-hi def link kconfigDefBoolNCSymbol kconfigSymbol
-hi def link kconfigOptional kconfigConfigOption
-hi def link kconfigConfigOptionIf Conditional
-hi def link kconfigConfOptIfExprCSym kconfigConstantSymbol
-hi def link kconfigConfOptIfExprNCSym kconfigSymbol
-hi def link kconfigOperator Operator
-hi def link kconfigConfOptIfExprEq kconfigOperator
-hi def link kconfigConfOptIfExprNEq kconfigOperator
-hi def link kconfigConfOptIfExprCSym2 kconfigConstantSymbol
-hi def link kconfigConfOptIfExprNCSym2 kconfigSymbol
-hi def link kconfigConfOptIfExprNeg kconfigOperator
-hi def link kconfigConfOptIfExprAnd kconfigOperator
-hi def link kconfigConfOptIfExprOr kconfigOperator
-hi def link kconfigDelimiter Delimiter
-hi def link kconfigConfOptIfExprGroup kconfigDelimiter
-hi def link kconfigConfOptIfGExpCSym kconfigConstantSymbol
-hi def link kconfigConfOptIfGExpNCSym kconfigSymbol
-hi def link kconfigConfOptIfGExpEq kconfigOperator
-hi def link kconfigConfOptIfGExpNEq kconfigOperator
-hi def link kconfigConfOptIfGExpCSym2 kconfigConstantSymbol
-hi def link kconfigConfOptIfGExpNCSym2 kconfigSymbol
-hi def link kconfigConfOptIfGExpNeg kconfigOperator
-hi def link kconfigConfOptIfGExpAnd kconfigOperator
-hi def link kconfigConfOptIfGExpOr kconfigOperator
-hi def link kconfigConfOptIfExprGrpE kconfigDelimiter
-hi def link kconfigConfOptExprCSym kconfigConstantSymbol
-hi def link kconfigConfOptExprNCSym kconfigSymbol
-hi def link kconfigConfOptExprEq kconfigOperator
-hi def link kconfigConfOptExprNEq kconfigOperator
-hi def link kconfigConfOptExprCSym2 kconfigConstantSymbol
-hi def link kconfigConfOptExprNCSym2 kconfigSymbol
-hi def link kconfigConfOptExprNeg kconfigOperator
-hi def link kconfigConfOptExprAnd kconfigOperator
-hi def link kconfigConfOptExprOr kconfigOperator
-hi def link kconfigConfOptExprGroup kconfigDelimiter
-hi def link kconfigConfOptGExpCSym kconfigConstantSymbol
-hi def link kconfigConfOptGExpNCSym kconfigSymbol
-hi def link kconfigConfOptGExpEq kconfigOperator
-hi def link kconfigConfOptGExpNEq kconfigOperator
-hi def link kconfigConfOptGExpCSym2 kconfigConstantSymbol
-hi def link kconfigConfOptGExpNCSym2 kconfigSymbol
-hi def link kconfigConfOptGExpNeg kconfigOperator
-hi def link kconfigConfOptGExpAnd kconfigOperator
-hi def link kconfigConfOptGExpOr kconfigOperator
-hi def link kconfigConfOptExprGrpE kconfigConfOptIfExprGroup
+ syn match kconfigBegin '^' nextgroup=kconfigKeyword
+ \ skipwhite
+
+ syn keyword kconfigTodo contained TODO FIXME XXX NOTE
+
+ syn match kconfigComment display '#.*$' contains=kconfigTodo
+
+ syn keyword kconfigKeyword config nextgroup=kconfigSymbol
+ \ skipwhite
+
+ syn keyword kconfigKeyword menuconfig nextgroup=kconfigSymbol
+ \ skipwhite
+
+ syn keyword kconfigKeyword comment menu mainmenu
+ \ nextgroup=kconfigKeywordPrompt
+ \ skipwhite
+
+ syn keyword kconfigKeyword choice
+ \ nextgroup=@kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn keyword kconfigKeyword endmenu endchoice
+
+ syn keyword kconfigPreProc source
+ \ nextgroup=kconfigPath
+ \ skipwhite
+
+ " TODO: This is a hack. The who .*Expr stuff should really be generated so
+ " that we can reuse it for various nextgroups.
+ syn keyword kconfigConditional if endif
+ \ nextgroup=@kconfigConfigOptionIfExpr
+ \ skipwhite
+
+ syn match kconfigKeywordPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=@kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigPath '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
+ \ contained
+
+ syn match kconfigSymbol '\<\k\+\>'
+ \ contained
+ \ nextgroup=@kconfigConfigOptions
+ \ skipwhite skipnl
+
+ " FIXME: There is – probably – no reason to cluster these instead of just
+ " defining them in the same group.
+ syn cluster kconfigConfigOptions contains=kconfigTypeDefinition,
+ \ kconfigInputPrompt,
+ \ kconfigDefaultValue,
+ \ kconfigDependencies,
+ \ kconfigReverseDependencies,
+ \ kconfigNumericalRanges,
+ \ kconfigHelpText,
+ \ kconfigDefBool,
+ \ kconfigOptional
+
+ syn keyword kconfigTypeDefinition bool boolean tristate string hex int
+ \ contained
+ \ nextgroup=kconfigTypeDefPrompt,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigTypeDefPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigTypeDefPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn keyword kconfigInputPrompt prompt
+ \ contained
+ \ nextgroup=kconfigPromptPrompt
+ \ skipwhite
+
+ syn match kconfigPromptPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigPromptPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn keyword kconfigDefaultValue default
+ \ contained
+ \ nextgroup=@kconfigConfigOptionExpr
+ \ skipwhite
+
+ syn match kconfigDependencies 'depends on\|requires'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfExpr
+ \ skipwhite
+
+ syn keyword kconfigReverseDependencies select
+ \ contained
+ \ nextgroup=@kconfigRevDepSymbol
+ \ skipwhite
+
+ syn cluster kconfigRevDepSymbol contains=kconfigRevDepCSymbol,
+ \ kconfigRevDepNCSymbol
+
+ syn match kconfigRevDepCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigRevDepCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigRevDepNCSymbol '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn keyword kconfigNumericalRanges range
+ \ contained
+ \ nextgroup=@kconfigRangeSymbol
+ \ skipwhite
+
+ syn cluster kconfigRangeSymbol contains=kconfigRangeCSymbol,
+ \ kconfigRangeNCSymbol
+
+ syn match kconfigRangeCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=@kconfigRangeSymbol2
+ \ skipwhite skipnl
+
+ syn match kconfigRangeCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=@kconfigRangeSymbol2
+ \ skipwhite skipnl
+
+ syn match kconfigRangeNCSymbol '\<\k\+\>'
+ \ contained
+ \ nextgroup=@kconfigRangeSymbol2
+ \ skipwhite skipnl
+
+ syn cluster kconfigRangeSymbol2 contains=kconfigRangeCSymbol2,
+ \ kconfigRangeNCSymbol2
+
+ syn match kconfigRangeCSymbol2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigRangeNCSymbol2 '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn region kconfigHelpText contained
+ \ matchgroup=kconfigConfigOption
+ \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)'
+ \ skip='^$'
+ \ end='^\z1\@!'
+ \ nextgroup=@kconfigConfigOptions
+ \ skipwhite skipnl
+
+ " XXX: Undocumented
+ syn keyword kconfigDefBool def_bool
+ \ contained
+ \ nextgroup=@kconfigDefBoolSymbol
+ \ skipwhite
+
+ syn cluster kconfigDefBoolSymbol contains=kconfigDefBoolCSymbol,
+ \ kconfigDefBoolNCSymbol
+
+ syn match kconfigDefBoolCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigDefBoolCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigDefBoolNCSymbol '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ " XXX: This is actually only a valid option for “choice”, but treating it
+ " specially would require a lot of extra groups.
+ syn keyword kconfigOptional optional
+ \ contained
+ \ nextgroup=@kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn keyword kconfigConfigOptionIf if
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfExpr
+ \ skipwhite
+
+ syn cluster kconfigConfigOptionIfExpr contains=@kconfigConfOptIfExprSym,
+ \ kconfigConfOptIfExprNeg,
+ \ kconfigConfOptIfExprGroup
+
+ syn cluster kconfigConfOptIfExprSym contains=kconfigConfOptIfExprCSym,
+ \ kconfigConfOptIfExprNCSym
+
+ syn match kconfigConfOptIfExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=@kconfigConfigOptions,
+ \ kconfigConfOptIfExprAnd,
+ \ kconfigConfOptIfExprOr,
+ \ kconfigConfOptIfExprEq,
+ \ kconfigConfOptIfExprNEq
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=@kconfigConfigOptions,
+ \ kconfigConfOptIfExprAnd,
+ \ kconfigConfOptIfExprOr,
+ \ kconfigConfOptIfExprEq,
+ \ kconfigConfOptIfExprNEq
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfExprNCSym '\<\k\+\>'
+ \ contained
+ \ nextgroup=@kconfigConfigOptions,
+ \ kconfigConfOptIfExprAnd,
+ \ kconfigConfOptIfExprOr,
+ \ kconfigConfOptIfExprEq,
+ \ kconfigConfOptIfExprNEq
+ \ skipwhite skipnl
+
+ syn cluster kconfigConfOptIfExprSym2 contains=kconfigConfOptIfExprCSym2,
+ \ kconfigConfOptIfExprNCSym2
+
+ syn match kconfigConfOptIfExprEq '='
+ \ contained
+ \ nextgroup=@kconfigConfOptIfExprSym2
+ \ skipwhite
+
+ syn match kconfigConfOptIfExprNEq '!='
+ \ contained
+ \ nextgroup=@kconfigConfOptIfExprSym2
+ \ skipwhite
+
+ syn match kconfigConfOptIfExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=@kconfigConfigOptions,
+ \ kconfigConfOptIfExprAnd,
+ \ kconfigConfOptIfExprOr
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfExprNCSym2 '\<\k\+\>'
+ \ contained
+ \ nextgroup=@kconfigConfigOptions,
+ \ kconfigConfOptIfExprAnd,
+ \ kconfigConfOptIfExprOr
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfExprNeg '!'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfExpr
+ \ skipwhite
+
+ syn match kconfigConfOptIfExprAnd '&&'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfExpr
+ \ skipwhite
+
+ syn match kconfigConfOptIfExprOr '||'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfExpr
+ \ skipwhite
+
+ syn match kconfigConfOptIfExprGroup '('
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfGExp
+ \ skipwhite
+
+ " TODO: hm, this kind of recursion doesn't work right. We need another set of
+ " expressions that have kconfigConfigOPtionIfGExp as nextgroup and a matcher
+ " for '(' that sets it all off.
+ syn cluster kconfigConfigOptionIfGExp contains=@kconfigConfOptIfGExpSym,
+ \ kconfigConfOptIfGExpNeg,
+ \ kconfigConfOptIfExprGroup
+
+ syn cluster kconfigConfOptIfGExpSym contains=kconfigConfOptIfGExpCSym,
+ \ kconfigConfOptIfGExpNCSym
+
+ syn match kconfigConfOptIfGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=@kconfigConfigIf,
+ \ kconfigConfOptIfGExpAnd,
+ \ kconfigConfOptIfGExpOr,
+ \ kconfigConfOptIfGExpEq,
+ \ kconfigConfOptIfGExpNEq
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=@kconfigConfigIf,
+ \ kconfigConfOptIfGExpAnd,
+ \ kconfigConfOptIfGExpOr,
+ \ kconfigConfOptIfGExpEq,
+ \ kconfigConfOptIfGExpNEq
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfGExpNCSym '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfOptIfExprGrpE,
+ \ kconfigConfOptIfGExpAnd,
+ \ kconfigConfOptIfGExpOr,
+ \ kconfigConfOptIfGExpEq,
+ \ kconfigConfOptIfGExpNEq
+ \ skipwhite skipnl
+
+ syn cluster kconfigConfOptIfGExpSym2 contains=kconfigConfOptIfGExpCSym2,
+ \ kconfigConfOptIfGExpNCSym2
+
+ syn match kconfigConfOptIfGExpEq '='
+ \ contained
+ \ nextgroup=@kconfigConfOptIfGExpSym2
+ \ skipwhite
+
+ syn match kconfigConfOptIfGExpNEq '!='
+ \ contained
+ \ nextgroup=@kconfigConfOptIfGExpSym2
+ \ skipwhite
+
+ syn match kconfigConfOptIfGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfOptIfExprGrpE,
+ \ kconfigConfOptIfGExpAnd,
+ \ kconfigConfOptIfGExpOr
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfOptIfExprGrpE,
+ \ kconfigConfOptIfGExpAnd,
+ \ kconfigConfOptIfGExpOr
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfGExpNCSym2 '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfOptIfExprGrpE,
+ \ kconfigConfOptIfGExpAnd,
+ \ kconfigConfOptIfGExpOr
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptIfGExpNeg '!'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfGExp
+ \ skipwhite
+
+ syn match kconfigConfOptIfGExpAnd '&&'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfGExp
+ \ skipwhite
+
+ syn match kconfigConfOptIfGExpOr '||'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionIfGExp
+ \ skipwhite
+
+ syn match kconfigConfOptIfExprGrpE ')'
+ \ contained
+ \ nextgroup=@kconfigConfigOptions,
+ \ kconfigConfOptIfExprAnd,
+ \ kconfigConfOptIfExprOr
+ \ skipwhite skipnl
+
+
+ syn cluster kconfigConfigOptionExpr contains=@kconfigConfOptExprSym,
+ \ kconfigConfOptExprNeg,
+ \ kconfigConfOptExprGroup
+
+ syn cluster kconfigConfOptExprSym contains=kconfigConfOptExprCSym,
+ \ kconfigConfOptExprNCSym
+
+ syn match kconfigConfOptExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ kconfigConfOptExprAnd,
+ \ kconfigConfOptExprOr,
+ \ kconfigConfOptExprEq,
+ \ kconfigConfOptExprNEq,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ kconfigConfOptExprAnd,
+ \ kconfigConfOptExprOr,
+ \ kconfigConfOptExprEq,
+ \ kconfigConfOptExprNEq,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptExprNCSym '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ kconfigConfOptExprAnd,
+ \ kconfigConfOptExprOr,
+ \ kconfigConfOptExprEq,
+ \ kconfigConfOptExprNEq,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn cluster kconfigConfOptExprSym2 contains=kconfigConfOptExprCSym2,
+ \ kconfigConfOptExprNCSym2
+
+ syn match kconfigConfOptExprEq '='
+ \ contained
+ \ nextgroup=@kconfigConfOptExprSym2
+ \ skipwhite
+
+ syn match kconfigConfOptExprNEq '!='
+ \ contained
+ \ nextgroup=@kconfigConfOptExprSym2
+ \ skipwhite
+
+ syn match kconfigConfOptExprCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ kconfigConfOptExprAnd,
+ \ kconfigConfOptExprOr,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ kconfigConfOptExprAnd,
+ \ kconfigConfOptExprOr,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptExprNCSym2 '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ kconfigConfOptExprAnd,
+ \ kconfigConfOptExprOr,
+ \ @kconfigConfigOptions
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptExprNeg '!'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionExpr
+ \ skipwhite
+
+ syn match kconfigConfOptExprAnd '&&'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionExpr
+ \ skipwhite
+
+ syn match kconfigConfOptExprOr '||'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionExpr
+ \ skipwhite
+
+ syn match kconfigConfOptExprGroup '('
+ \ contained
+ \ nextgroup=@kconfigConfigOptionGExp
+ \ skipwhite
+
+ syn cluster kconfigConfigOptionGExp contains=@kconfigConfOptGExpSym,
+ \ kconfigConfOptGExpNeg,
+ \ kconfigConfOptGExpGroup
+
+ syn cluster kconfigConfOptGExpSym contains=kconfigConfOptGExpCSym,
+ \ kconfigConfOptGExpNCSym
+
+ syn match kconfigConfOptGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfOptExprGrpE,
+ \ kconfigConfOptGExpAnd,
+ \ kconfigConfOptGExpOr,
+ \ kconfigConfOptGExpEq,
+ \ kconfigConfOptGExpNEq
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfOptExprGrpE,
+ \ kconfigConfOptGExpAnd,
+ \ kconfigConfOptGExpOr,
+ \ kconfigConfOptGExpEq,
+ \ kconfigConfOptGExpNEq
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptGExpNCSym '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfOptExprGrpE,
+ \ kconfigConfOptGExpAnd,
+ \ kconfigConfOptGExpOr,
+ \ kconfigConfOptGExpEq,
+ \ kconfigConfOptGExpNEq
+ \ skipwhite skipnl
+
+ syn cluster kconfigConfOptGExpSym2 contains=kconfigConfOptGExpCSym2,
+ \ kconfigConfOptGExpNCSym2
+
+ syn match kconfigConfOptGExpEq '='
+ \ contained
+ \ nextgroup=@kconfigConfOptGExpSym2
+ \ skipwhite
+
+ syn match kconfigConfOptGExpNEq '!='
+ \ contained
+ \ nextgroup=@kconfigConfOptGExpSym2
+ \ skipwhite
+
+ syn match kconfigConfOptGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
+ \ contained
+ \ nextgroup=kconfigConfOptExprGrpE,
+ \ kconfigConfOptGExpAnd,
+ \ kconfigConfOptGExpOr
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
+ \ contained
+ \ nextgroup=kconfigConfOptExprGrpE,
+ \ kconfigConfOptGExpAnd,
+ \ kconfigConfOptGExpOr
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptGExpNCSym2 '\<\k\+\>'
+ \ contained
+ \ nextgroup=kconfigConfOptExprGrpE,
+ \ kconfigConfOptGExpAnd,
+ \ kconfigConfOptGExpOr
+ \ skipwhite skipnl
+
+ syn match kconfigConfOptGExpNeg '!'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionGExp
+ \ skipwhite
+
+ syn match kconfigConfOptGExpAnd '&&'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionGExp
+ \ skipwhite
+
+ syn match kconfigConfOptGExpOr '||'
+ \ contained
+ \ nextgroup=@kconfigConfigOptionGExp
+ \ skipwhite
+
+ syn match kconfigConfOptExprGrpE ')'
+ \ contained
+ \ nextgroup=kconfigConfigOptionIf,
+ \ kconfigConfOptExprAnd,
+ \ kconfigConfOptExprOr
+ \ skipwhite skipnl
+
+ hi def link kconfigTodo Todo
+ hi def link kconfigComment Comment
+ hi def link kconfigKeyword Keyword
+ hi def link kconfigPreProc PreProc
+ hi def link kconfigConditional Conditional
+ hi def link kconfigPrompt String
+ hi def link kconfigKeywordPrompt kconfigPrompt
+ hi def link kconfigPath String
+ hi def link kconfigSymbol String
+ hi def link kconfigConstantSymbol Constant
+ hi def link kconfigConfigOption Type
+ hi def link kconfigTypeDefinition kconfigConfigOption
+ hi def link kconfigTypeDefPrompt kconfigPrompt
+ hi def link kconfigInputPrompt kconfigConfigOption
+ hi def link kconfigPromptPrompt kconfigPrompt
+ hi def link kconfigDefaultValue kconfigConfigOption
+ hi def link kconfigDependencies kconfigConfigOption
+ hi def link kconfigReverseDependencies kconfigConfigOption
+ hi def link kconfigRevDepCSymbol kconfigConstantSymbol
+ hi def link kconfigRevDepNCSymbol kconfigSymbol
+ hi def link kconfigNumericalRanges kconfigConfigOption
+ hi def link kconfigRangeCSymbol kconfigConstantSymbol
+ hi def link kconfigRangeNCSymbol kconfigSymbol
+ hi def link kconfigRangeCSymbol2 kconfigConstantSymbol
+ hi def link kconfigRangeNCSymbol2 kconfigSymbol
+ hi def link kconfigHelpText Normal
+ hi def link kconfigDefBool kconfigConfigOption
+ hi def link kconfigDefBoolCSymbol kconfigConstantSymbol
+ hi def link kconfigDefBoolNCSymbol kconfigSymbol
+ hi def link kconfigOptional kconfigConfigOption
+ hi def link kconfigConfigOptionIf Conditional
+ hi def link kconfigConfOptIfExprCSym kconfigConstantSymbol
+ hi def link kconfigConfOptIfExprNCSym kconfigSymbol
+ hi def link kconfigOperator Operator
+ hi def link kconfigConfOptIfExprEq kconfigOperator
+ hi def link kconfigConfOptIfExprNEq kconfigOperator
+ hi def link kconfigConfOptIfExprCSym2 kconfigConstantSymbol
+ hi def link kconfigConfOptIfExprNCSym2 kconfigSymbol
+ hi def link kconfigConfOptIfExprNeg kconfigOperator
+ hi def link kconfigConfOptIfExprAnd kconfigOperator
+ hi def link kconfigConfOptIfExprOr kconfigOperator
+ hi def link kconfigDelimiter Delimiter
+ hi def link kconfigConfOptIfExprGroup kconfigDelimiter
+ hi def link kconfigConfOptIfGExpCSym kconfigConstantSymbol
+ hi def link kconfigConfOptIfGExpNCSym kconfigSymbol
+ hi def link kconfigConfOptIfGExpEq kconfigOperator
+ hi def link kconfigConfOptIfGExpNEq kconfigOperator
+ hi def link kconfigConfOptIfGExpCSym2 kconfigConstantSymbol
+ hi def link kconfigConfOptIfGExpNCSym2 kconfigSymbol
+ hi def link kconfigConfOptIfGExpNeg kconfigOperator
+ hi def link kconfigConfOptIfGExpAnd kconfigOperator
+ hi def link kconfigConfOptIfGExpOr kconfigOperator
+ hi def link kconfigConfOptIfExprGrpE kconfigDelimiter
+ hi def link kconfigConfOptExprCSym kconfigConstantSymbol
+ hi def link kconfigConfOptExprNCSym kconfigSymbol
+ hi def link kconfigConfOptExprEq kconfigOperator
+ hi def link kconfigConfOptExprNEq kconfigOperator
+ hi def link kconfigConfOptExprCSym2 kconfigConstantSymbol
+ hi def link kconfigConfOptExprNCSym2 kconfigSymbol
+ hi def link kconfigConfOptExprNeg kconfigOperator
+ hi def link kconfigConfOptExprAnd kconfigOperator
+ hi def link kconfigConfOptExprOr kconfigOperator
+ hi def link kconfigConfOptExprGroup kconfigDelimiter
+ hi def link kconfigConfOptGExpCSym kconfigConstantSymbol
+ hi def link kconfigConfOptGExpNCSym kconfigSymbol
+ hi def link kconfigConfOptGExpEq kconfigOperator
+ hi def link kconfigConfOptGExpNEq kconfigOperator
+ hi def link kconfigConfOptGExpCSym2 kconfigConstantSymbol
+ hi def link kconfigConfOptGExpNCSym2 kconfigSymbol
+ hi def link kconfigConfOptGExpNeg kconfigOperator
+ hi def link kconfigConfOptGExpAnd kconfigOperator
+ hi def link kconfigConfOptGExpOr kconfigOperator
+ hi def link kconfigConfOptExprGrpE kconfigConfOptIfExprGroup
else
-syn keyword kconfigTodo contained TODO FIXME XXX NOTE
+ syn keyword kconfigTodo contained TODO FIXME XXX NOTE
-syn match kconfigComment display '#.*$' contains=kconfigTodo
+ syn match kconfigComment display '#.*$' contains=kconfigTodo
-syn keyword kconfigKeyword config menuconfig comment mainmenu
+ syn keyword kconfigKeyword config menuconfig comment mainmenu
-syn keyword kconfigConditional menu endmenu choice endchoice if endif
+ syn keyword kconfigConditional menu endmenu choice endchoice if endif
-syn keyword kconfigPreProc source
- \ nextgroup=kconfigPath
- \ skipwhite
+ syn keyword kconfigPreProc source
+ \ nextgroup=kconfigPath
+ \ skipwhite
-syn keyword kconfigTriState y m n
+ syn keyword kconfigTriState y m n
-syn match kconfigSpecialChar contained '\\.'
-syn match kconfigSpecialChar '\\$'
+ syn match kconfigSpecialChar contained '\\.'
+ syn match kconfigSpecialChar '\\$'
-syn region kconfigPath matchgroup=kconfigPath
- \ start=+"+ skip=+\\\\\|\\\"+ end=+"+
- \ contains=kconfigSpecialChar
+ syn region kconfigPath matchgroup=kconfigPath
+ \ start=+"+ skip=+\\\\\|\\\"+ end=+"+
+ \ contains=kconfigSpecialChar
-syn region kconfigPath matchgroup=kconfigPath
- \ start=+'+ skip=+\\\\\|\\\'+ end=+'+
- \ contains=kconfigSpecialChar
+ syn region kconfigPath matchgroup=kconfigPath
+ \ start=+'+ skip=+\\\\\|\\\'+ end=+'+
+ \ contains=kconfigSpecialChar
-syn match kconfigPath '\S\+'
- \ contained
+ syn match kconfigPath '\S\+'
+ \ contained
-syn region kconfigString matchgroup=kconfigString
- \ start=+"+ skip=+\\\\\|\\\"+ end=+"+
- \ contains=kconfigSpecialChar
+ syn region kconfigString matchgroup=kconfigString
+ \ start=+"+ skip=+\\\\\|\\\"+ end=+"+
+ \ contains=kconfigSpecialChar
-syn region kconfigString matchgroup=kconfigString
- \ start=+'+ skip=+\\\\\|\\\'+ end=+'+
- \ contains=kconfigSpecialChar
+ syn region kconfigString matchgroup=kconfigString
+ \ start=+'+ skip=+\\\\\|\\\'+ end=+'+
+ \ contains=kconfigSpecialChar
-syn keyword kconfigType bool boolean tristate string hex int
+ syn keyword kconfigType bool boolean tristate string hex int
-syn keyword kconfigOption prompt default requires select range
- \ optional
-syn match kconfigOption 'depends\%( on\)\='
+ syn keyword kconfigOption prompt default requires select range
+ \ optional
+ syn match kconfigOption 'depends\%( on\)\='
-syn keyword kconfigMacro def_bool def_tristate
+ syn keyword kconfigMacro def_bool def_tristate
-syn region kconfigHelpText
- \ matchgroup=kconfigOption
- \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)'
- \ skip='^$'
- \ end='^\z1\@!'
+ syn region kconfigHelpText
+ \ matchgroup=kconfigOption
+ \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)'
+ \ skip='^$'
+ \ end='^\z1\@!'
-hi def link kconfigTodo Todo
-hi def link kconfigComment Comment
-hi def link kconfigKeyword Keyword
-hi def link kconfigConditional Conditional
-hi def link kconfigPreProc PreProc
-hi def link kconfigTriState Boolean
-hi def link kconfigSpecialChar SpecialChar
-hi def link kconfigPath String
-hi def link kconfigString String
-hi def link kconfigType Type
-hi def link kconfigOption Identifier
-hi def link kconfigHelpText Normal
-hi def link kconfigmacro Macro
+ hi def link kconfigTodo Todo
+ hi def link kconfigComment Comment
+ hi def link kconfigKeyword Keyword
+ hi def link kconfigConditional Conditional
+ hi def link kconfigPreProc PreProc
+ hi def link kconfigTriState Boolean
+ hi def link kconfigSpecialChar SpecialChar
+ hi def link kconfigPath String
+ hi def link kconfigString String
+ hi def link kconfigType Type
+ hi def link kconfigOption Identifier
+ hi def link kconfigHelpText Normal
+ hi def link kconfigmacro Macro
endif
diff --git a/runtime/syntax/netrw.vim b/runtime/syntax/netrw.vim
deleted file mode 100644
index f5b7fdc2c6..0000000000
--- a/runtime/syntax/netrw.vim
+++ /dev/null
@@ -1,148 +0,0 @@
-" Language : Netrw Listing Syntax
-" Maintainer: This runtime file is looking for a new maintainer.
-" Former Maintainer: Charles E. Campbell
-" Last Change: Nov 07, 2019
-" 2024 Feb 19 by Vim Project (announce adoption)
-" Version : 20
-" ---------------------------------------------------------------------
-if exists("b:current_syntax")
- finish
-endif
-
-" ---------------------------------------------------------------------
-" Directory List Syntax Highlighting: {{{1
-syn cluster NetrwGroup contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion,netrwCopyTgt
-syn cluster NetrwTreeGroup contains=netrwDir,netrwSymLink,netrwExe
-
-syn match netrwPlain "\(\S\+ \)*\S\+" contains=netrwLink,@NoSpell
-syn match netrwSpecial "\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
-syn match netrwDir "\.\{1,2}/" contains=netrwClassify,@NoSpell
-syn match netrwDir "\%(\S\+ \)*\S\+/\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
-syn match netrwSizeDate "\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s" skipwhite contains=netrwDateSep,@NoSpell nextgroup=netrwTime
-syn match netrwSymLink "\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
-syn match netrwExe "\%(\S\+ \)*\S*[^~]\*\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
-if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4')
-syn match netrwTreeBar "^\%([-+|│] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup
-else
-syn match netrwTreeBar "^\%([-+|] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup
-endif
-syn match netrwTreeBarSpace " " contained
-
-syn match netrwClassify "[*=|@/]\ze\%(\s\{2,}\|$\)" contained
-syn match netrwDateSep "/" contained
-syn match netrwTime "\d\{1,2}:\d\{2}:\d\{2}" contained contains=netrwTimeSep
-syn match netrwTimeSep ":"
-
-syn match netrwComment '".*\%(\t\|$\)' contains=@NetrwGroup,@NoSpell
-syn match netrwHide '^"\s*\(Hid\|Show\)ing:' skipwhite contains=@NoSpell nextgroup=netrwHidePat
-syn match netrwSlash "/" contained
-syn match netrwHidePat "[^,]\+" contained skipwhite contains=@NoSpell nextgroup=netrwHideSep
-syn match netrwHideSep "," contained skipwhite nextgroup=netrwHidePat
-syn match netrwSortBy "Sorted by" contained transparent skipwhite nextgroup=netrwList
-syn match netrwSortSeq "Sort sequence:" contained transparent skipwhite nextgroup=netrwList
-syn match netrwCopyTgt "Copy/Move Tgt:" contained transparent skipwhite nextgroup=netrwList
-syn match netrwList ".*$" contained contains=netrwComma,@NoSpell
-syn match netrwComma "," contained
-syn region netrwQuickHelp matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd,netrwQHTopic,@NoSpell keepend contained
-syn match netrwHelpCmd "\S\+\ze:" contained skipwhite contains=@NoSpell nextgroup=netrwCmdSep
-syn match netrwQHTopic "([a-zA-Z &]\+)" contained skipwhite
-syn match netrwCmdSep ":" contained nextgroup=netrwCmdNote
-syn match netrwCmdNote ".\{-}\ze " contained contains=@NoSpell
-syn match netrwVersion "(netrw.*)" contained contains=@NoSpell
-syn match netrwLink "-->" contained skipwhite
-
-" -----------------------------
-" Special filetype highlighting {{{1
-" -----------------------------
-if exists("g:netrw_special_syntax") && g:netrw_special_syntax
- if exists("+suffixes") && &suffixes != ""
- let suflist= join(split(&suffixes,','))
- let suflist= escape(substitute(suflist," ",'\\|','g'),'.~')
- exe "syn match netrwSpecFile '\\(\\S\\+ \\)*\\S*\\(".suflist."\\)\\>' contains=netrwTreeBar,@NoSpell"
- endif
- syn match netrwBak "\(\S\+ \)*\S\+\.bak\>" contains=netrwTreeBar,@NoSpell
- syn match netrwCompress "\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>" contains=netrwTreeBar,@NoSpell
- if has("unix")
- syn match netrwCoreDump "\<core\%(\.\d\+\)\=\>" contains=netrwTreeBar,@NoSpell
- endif
- syn match netrwLex "\(\S\+ \)*\S\+\.\%(l\|lex\)\>" contains=netrwTreeBar,@NoSpell
- syn match netrwYacc "\(\S\+ \)*\S\+\.y\>" contains=netrwTreeBar,@NoSpell
- syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell
- syn match netrwDoc "\(\S\+ \)*\S\+\.\%(doc\|txt\|pdf\|ps\|docx\)\>" contains=netrwTreeBar,@NoSpell
- syn match netrwHdr "\(\S\+ \)*\S\+\.\%(h\|hpp\)\>" contains=netrwTreeBar,@NoSpell
- syn match netrwLib "\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>" contains=netrwTreeBar,@NoSpell
- syn match netrwMakeFile "\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>" contains=netrwTreeBar,@NoSpell
- syn match netrwObj "\(\S\+ \)*\S*\.\%(o\|obj\)\>" contains=netrwTreeBar,@NoSpell
- syn match netrwPix "\c\(\S\+ \)*\S*\.\%(bmp\|fits\=\|gif\|je\=pg\|pcx\|ppc\|pgm\|png\|ppm\|psd\|rgb\|tif\|xbm\|xcf\)\>" contains=netrwTreeBar,@NoSpell
- syn match netrwTags "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell
- syn match netrwTags "\<tags\>" contains=netrwTreeBar,@NoSpell
- syn match netrwTilde "\(\S\+ \)*\S\+\~\*\=\>" contains=netrwTreeBar,@NoSpell
- syn match netrwTmp "\<tmp\(\S\+ \)*\S\+\>\|\(\S\+ \)*\S*tmp\>" contains=netrwTreeBar,@NoSpell
-endif
-
-" ---------------------------------------------------------------------
-" Highlighting Links: {{{1
-if !exists("did_drchip_netrwlist_syntax")
- let did_drchip_netrwlist_syntax= 1
- hi default link netrwClassify Function
- hi default link netrwCmdSep Delimiter
- hi default link netrwComment Comment
- hi default link netrwDir Directory
- hi default link netrwHelpCmd Function
- hi default link netrwQHTopic Number
- hi default link netrwHidePat Statement
- hi default link netrwHideSep netrwComment
- hi default link netrwList Statement
- hi default link netrwVersion Identifier
- hi default link netrwSymLink Question
- hi default link netrwExe PreProc
- hi default link netrwDateSep Delimiter
-
- hi default link netrwTreeBar Special
- hi default link netrwTimeSep netrwDateSep
- hi default link netrwComma netrwComment
- hi default link netrwHide netrwComment
- hi default link netrwMarkFile TabLineSel
- hi default link netrwLink Special
-
- " special syntax highlighting (see :he g:netrw_special_syntax)
- hi default link netrwCoreDump WarningMsg
- hi default link netrwData Folded
- hi default link netrwHdr netrwPlain
- hi default link netrwLex netrwPlain
- hi default link netrwLib DiffChange
- hi default link netrwMakefile DiffChange
- hi default link netrwYacc netrwPlain
- hi default link netrwPix Special
-
- hi default link netrwBak netrwGray
- hi default link netrwCompress netrwGray
- hi default link netrwSpecFile netrwGray
- hi default link netrwObj netrwGray
- hi default link netrwTags netrwGray
- hi default link netrwTilde netrwGray
- hi default link netrwTmp netrwGray
-endif
-
- " set up netrwGray to be understated (but not Ignore'd or Conceal'd, as those
- " can be hard/impossible to read). Users may override this in a colorscheme by
- " specifying netrwGray highlighting.
- redir => s:netrwgray
- sil hi netrwGray
- redir END
- if s:netrwgray !~ 'guifg'
- if has("gui") && has("gui_running")
- if &bg == "dark"
- exe "hi netrwGray gui=NONE guifg=gray30"
- else
- exe "hi netrwGray gui=NONE guifg=gray70"
- endif
- else
- hi link netrwGray Folded
- endif
- endif
-
-" Current Syntax: {{{1
-let b:current_syntax = "netrwlist"
-" ---------------------------------------------------------------------
-" vim: ts=8 fdm=marker
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index d71a966553..67268cdfe3 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -6,6 +6,7 @@
" Last Change: 2024 Mar 04 by Vim Project
" 2024 Nov 03 by Aliaksei Budavei <0x000c70 AT gmail DOT com> (improved bracket expressions, #15941)
" 2025 Jan 06 add $PS0 to bashSpecialVariables (#16394)
+" 2025 Jan 18 add bash coproc, remove duplicate syn keywords (#16467)
" Version: 208
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
@@ -24,7 +25,7 @@ elseif getline(1) =~ '\<bash\>'
elseif getline(1) =~ '\<dash\>'
let b:is_dash = 1
elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") && !exists("g:is_dash")
- " user did not specify which shell to use, and
+ " user did not specify which shell to use, and
" the script itself does not specify which shell to use. FYI: /bin/sh is ambiguous.
" Assuming /bin/sh is executable, and if its a link, find out what it links to.
let s:shell = ""
@@ -352,7 +353,7 @@ if exists("b:is_bash")
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
elseif exists("b:is_kornshell")
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
-else
+else
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
endif
ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
@@ -405,7 +406,7 @@ syn region shCmdParenRegion matchgroup=shCmdSubRegion start="((\@!" skip='\\\\\|
if exists("b:is_bash")
syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
syn cluster shCaseList add=bashAdminStatement,bashStatement
- syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS0 PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID
+ syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ARGC BASH_ARGV BASH_CMDS BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_LINENO BASHOPTS BASHPID BASH_REMATCH BASH_SOURCE BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD CDPATH COLUMNS COMP_CWORD COMP_KEY COMP_LINE COMP_POINT COMPREPLY COMP_TYPE COMP_WORDBREAKS COMP_WORDS COPROC COPROC_PID DIRSTACK EMACS ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_NUMERIC LINENO LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT PPID PROMPT_COMMAND PS0 PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_POINT REPLY SECONDS SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR UID
syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep head less ls mkdir mv rm rmdir rpm sed sleep sort strip tail
syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop
syn keyword bashStatement command compgen
@@ -540,6 +541,7 @@ if !exists("b:is_posix")
endif
if exists("b:is_bash")
+ syn keyword shFunctionKey coproc
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
@@ -693,10 +695,10 @@ if exists("b:is_kornshell") || exists("b:is_posix")
" Additional bash Keywords: {{{1
" =====================
elseif exists("b:is_bash")
- syn keyword shStatement bg builtin disown export false fg getopts jobs let printf sleep true unalias
+ syn keyword shStatement bg builtin disown export false fg getopts jobs let printf true unalias
syn keyword shStatement typeset nextgroup=shSetOption
syn keyword shStatement fc hash history source suspend times type
- syn keyword shStatement bind builtin caller compopt declare dirs disown enable export help logout local mapfile popd pushd readarray shopt source typeset
+ syn keyword shStatement bind caller compopt declare dirs enable help logout local mapfile popd pushd readarray shopt typeset
else
syn keyword shStatement login newgrp
endif
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 77a40e11d3..4f35bba939 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -3,7 +3,8 @@
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Charles E. Campbell
" Last Change: Apr 22, 2022
-" 2024 Feb 19 by Vim Project (announce adoption)
+" 2024 Feb 19 by Vim Project: announce adoption
+" 2025 Jan 18 by Vim Project: add texEmphStyle to texMatchGroup, #16228
" Version: 121
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
@@ -176,11 +177,11 @@ if !s:tex_excludematcher
endif
if !s:tex_nospell
if !s:tex_no_error
- syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
+ syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texEmphStyle,texZone,texInputFile,texOption,@Spell
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell
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,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
+ 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,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texEmphStyle,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,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,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,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell
endif
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index edc69b907c..c4e231d145 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -185,13 +185,13 @@ Vim9 syn keyword vim9Boolean true false
" Numbers {{{2
" =======
syn case ignore
-syn match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
-syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
-syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
-syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
-syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
-syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
-syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
+syn match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
+syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
+syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
+syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
+syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
+syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
+syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
syn case match
" All vimCommands are contained by vimIsCommand. {{{2
@@ -274,10 +274,16 @@ syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBan
" Operators: {{{2
" =========
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar,vimBoolean,vimNull
-syn match vimOper "\a\@<!!" skipwhite nextgroup=vimString,vimSpecFile
-syn match vimOper "||\|&&\|[-+*/%.]" skipwhite nextgroup=vimString,vimSpecFile
-syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
-syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "\a\@<!!" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "||\|&&\|[-+*/%.]" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "?" skipwhite nextgroup=@vimExprList
+" distinguish ternary : from ex-colon
+syn match vimOper "\s\@1<=:\ze\s\|\s\@1<=:$" skipwhite nextgroup=@vimExprList
+syn match vimOper "??" skipwhite nextgroup=@vimExprList
+syn match vimOper "=" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "\%#=1\%(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\)[?#]\=" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "\<is\%(not\)\=\>" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "\<is\%(not\)\=[?#]" skipwhite nextgroup=vimString,vimSpecFile
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
@@ -289,9 +295,9 @@ endif
syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncSID,Tag
syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag
-syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
-syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet
-syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For
+syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
+syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet,vimSearch
+syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9Search
syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList
syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey
@@ -1017,8 +1023,10 @@ syn match vim9CommentTitleLeader '#\s\+'ms=s+1 contained
" Searches And Globals: {{{2
" ====================
-syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
+VimL syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained
+Vim9 syn match vim9Search '^\s*:[/?].*' contains=vim9SearchDelim
+syn match vim9SearchDelim '^\s*\zs:[/?]\|[/?]$' contained contains=vimCmdSep
syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
@@ -1404,8 +1412,8 @@ if !exists("skip_vim_syntax_inits")
hi def link vimQuoteEscape vimEscape
hi def link vimRegister SpecialChar
hi def link vimScriptDelim Comment
- hi def link vimSearchDelim Statement
hi def link vimSearch vimString
+ hi def link vimSearchDelim Delimiter
hi def link vimSep Delimiter
hi def link vimSet vimCommand
hi def link vimSetAll vimOption
@@ -1498,6 +1506,8 @@ if !exists("skip_vim_syntax_inits")
hi def link vim9MethodNameError vimFunctionError
hi def link vim9Null Constant
hi def link vim9Public vimCommand
+ hi def link vim9Search vimString
+ hi def link vim9SearchDelim Delimiter
hi def link vim9Static vimCommand
hi def link vim9Super Identifier
hi def link vim9This Identifier