-*syntax.txt* For Vim version 9.2. Last change: 2026 Jun 01
+*syntax.txt* For Vim version 9.2. Last change: 2026 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
cpp_no_cpp17 don't highlight C++17 standard items
cpp_no_cpp20 don't highlight C++20 standard items
cpp_no_cpp23 don't highlight C++23 standard items
+cpp_no_cpp26 don't highlight C++26 standard items
CSH *csh.vim* *ft-csh-syntax*
syn keyword cppType float16_t float32_t float64_t float128_t bfloat16_t
endif
+" C++ 26 extensions
+if !exists("cpp_no_cpp26")
+ " attribute [[ ... ]] with optional value expr, eg [[=foo{1}]]
+ syn region cppAttribute matchgroup=cppAttributeBracket start="\w\@1<!\[\[" end="\]\]" contains=TOP,@Spell
+ syn match cppReflect "\^\^"
+ syn match cppSpliceBracket "\[:\|:\]"
+ syn keyword cppStatement contract_assert
+endif
+
" The minimum and maximum operators in GNU C++
syn match cppMinMax "[<>]?"
hi def link cppNumber Number
hi def link cppFloat Number
hi def link cppModule Include
+hi def link cppAttributeBracket Special
+hi def link cppReflect Operator
+hi def link cppSpliceBracket Special
let b:current_syntax = "cpp"
--- /dev/null
+>/+0#0000e05#ffffff0@1| |C|+@1|2|6| |l|e|x|i|c|a|l| |c|o|n|s|t|r|u|c|t|s| +0#0000000&@47
+@75
+|/+0#0000e05&@1| |P|3@1|9|4| |a|n@1|o|t|a|t|i|o|n|s|:| |[@1| |.@2| |]@1| |m|a|y| |c|a|r@1|y| |a| |v|a|l|u|e| |e|x|p|r|e|s@1|i|o|n|.| +0#0000000&@13
+|[+0#e000e06&@1|=+0#0000000&|r|e|n|a|m|e|{|"+0#e000002&|f|u|l@1|_|n|a|m|e|"|}+0#0000000&|]+0#e000e06&@1| +0#0000000&|i+0#00e0003&|n|t| +0#0000000&|b|r|a|c|e|d|;| @38
+|[+0#e000e06&@1|=+0#0000000&|k|e|y|(|8+0#e000002&|)+0#0000000&|]+0#e000e06&@1| +0#0000000&@13|i+0#00e0003&|n|t| +0#0000000&|p|a|r|e|n|e|d|;| @37
+|[+0#e000e06&@1|n+0#0000000&|o|d|i|s|c|a|r|d|]+0#e000e06&@1| +0#0000000&@11|i+0#00e0003&|n|t| +0#0000000&|p|l|a|i|n|(|)|;| @37
+@75
+|/+0#0000e05&@1| |P|2|9|0@1| |c|o|n|t|r|a|c|t|s|:| |c|o|n|t|r|a|c|t|_|a|s@1|e|r|t| |i|s| |a| |k|e|y|w|o|r|d|.| +0#0000000&@25
+|v+0#00e0003&|o|i|d| +0#0000000&|c|h|e|c|k|(|i+0#00e0003&|n|t| +0#0000000&|x|)| |{| |c+0#af5f00255&|o|n|t|r|a|c|t|_|a|s@1|e|r|t|(+0#0000000&|x| |!|=| |0+0#e000002&|)+0#0000000&|;| |}| @28
+@75
+|/+0#0000e05&@1| |P|2|9@1|6| |r|e|f|l|e|c|t|i|o|n| |(|^@1|)| |a|n|d| |s|p|l|i|c|i|n|g| |(|[|:| |:|]|)|.| +0#0000000&@28
+|c+0#00e0003&|o|n|s|t|e|x|p|r| +0#0000000&|a+0#00e0003&|u|t|o| +0#0000000&|r|e|f|l| |=| |^+0#af5f00255&@1|i+0#00e0003&|n|t|;+0#0000000&| @46
+|[+0#e000e06&|:|r+0#0000000&|e|f|l|:+0#e000e06&|]| +0#0000000&|s|p|l|i|c|e|d|{|}|;| @55
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56
|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|l|i|b|.|h|>| +0#0000000&@55
@75
-|[@1|n|o|r|e|t|u|r|n|]@1| |v+0#00e0003&|o|i|d| +0#0000000&|e|r@1|o|r|_|e|x|i|t|(|c+0#00e0003&|o|n|s|t| +0#0000000&|c+0#00e0003&|h|a|r|*+0#0000000&| |r|e|a|s|o|n|)| @26
+|[+0#e000e06&@1|n+0#0000000&|o|r|e|t|u|r|n|]+0#e000e06&@1| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|e|r@1|o|r|_|e|x|i|t|(|c+0#00e0003&|o|n|s|t| +0#0000000&|c+0#00e0003&|h|a|r|*+0#0000000&| |r|e|a|s|o|n|)| @26
|{| @73
@4|p|r|i|n|t|f|(|"+0#e000002&|E|r@1|o|r|:| |%+0#e000e06&|s|\|n|"+0#e000002&|,+0#0000000&| |r|e|a|s|o|n|)|;| @40
@4|e|x|i|t|(|1+0#e000002&|)+0#0000000&|;| @62
--- /dev/null
+// C++26 lexical constructs
+
+// P3394 annotations: [[ ... ]] may carry a value expression.
+[[=rename{"full_name"}]] int braced;
+[[=key(8)]] int parened;
+[[nodiscard]] int plain();
+
+// P2900 contracts: contract_assert is a keyword.
+void check(int x) { contract_assert(x != 0); }
+
+// P2996 reflection (^^) and splicing ([: :]).
+constexpr auto refl = ^^int;
+[:refl:] spliced{};