diff options
author | Christian Clason <christian.clason@uni-due.de> | 2021-09-13 15:05:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-13 06:05:27 -0700 |
commit | 1a9d2a4040f3ba3fe272488a7e85db6cdb453d39 (patch) | |
tree | 651f4cc1673c1e75f23d06e52da635bc3c7d0c5d /runtime/syntax/cpp.vim | |
parent | d5b66e88601b4d2fde5d905f9d12847126ba4449 (diff) | |
download | rneovim-1a9d2a4040f3ba3fe272488a7e85db6cdb453d39.tar.gz rneovim-1a9d2a4040f3ba3fe272488a7e85db6cdb453d39.tar.bz2 rneovim-1a9d2a4040f3ba3fe272488a7e85db6cdb453d39.zip |
vim-patch:89a9c159f23f #15641
Update runtime files
https://github.com/vim/vim/commit/89a9c159f23fb7b3e24e6d09068adfc24a73afcb
Omit:
nsis/lang/turkish.nsi
pixmaps/gen-inline-pixbufs.sh
doc/popup.txt
doc/terminal.txt
tutor/tutor*
src/[g]vimtutor
CONTRIBUTING.md
Skip:
doc/eval.txt (needs 8.1.2342)
doc/testing.txt (needs 8.2.0299)
Diffstat (limited to 'runtime/syntax/cpp.vim')
-rw-r--r-- | runtime/syntax/cpp.vim | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index 3ad79d5545..5437580a0a 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -2,7 +2,7 @@ " Language: C++ " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> -" Last Change: 2021 May 04 +" Last Change: 2021 Aug 23 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -60,7 +60,7 @@ if !exists("cpp_no_cpp14") syn match cppFloat display contained "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" syn match cppFloat display contained "\<\.\d\+\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" syn match cppFloat display contained "\<\d\+e[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" - syn region cppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell + syn region cppString start=+\(L\|u\|u8\|U\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell endif " C++ 17 extensions @@ -69,6 +69,20 @@ if !exists("cpp_no_cpp17") syn match cppCast "\<reinterpret_pointer_cast\s*$" syn match cppFloat display contained "\<0x\x*\.\x\+p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" syn match cppFloat display contained "\<0x\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + + " TODO: push this up to c.vim if/when supported in C23 + syn match cppCharacter "u8'[^\\]'" + syn match cppCharacter "u8'[^']*'" contains=cSpecial + if exists("c_gnu") + syn match cppSpecialError "u8'\\[^'\"?\\abefnrtv]'" + syn match cppSpecialCharacter "u8'\\['\"?\\abefnrtv]'" + else + syn match cppSpecialError "u8'\\[^'\"?\\abfnrtv]'" + syn match cppSpecialCharacter "u8'\\['\"?\\abfnrtv]'" + endif + syn match cppSpecialCharacter display "u8'\\\o\{1,3}'" + syn match cppSpecialCharacter display "u8'\\x\x\+'" + endif " C++ 20 extensions @@ -99,6 +113,9 @@ hi def link cppType Type hi def link cppStorageClass StorageClass hi def link cppStructure Structure hi def link cppBoolean Boolean +hi def link cppCharacter cCharacter +hi def link cppSpecialCharacter cSpecialCharacter +hi def link cppSpecialError cSpecialError hi def link cppConstant Constant hi def link cppRawStringDelimiter Delimiter hi def link cppRawString String |