10000 Merge pull request #39 from vivkin/master · ATANU50/vim-cpp@fa51a85 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa51a85

Browse files
authored
Merge pull request vim-jp#39 from vivkin/master
C++14 integer literals with quote as separator and auto as cppType
2 parents 178e581 + 6d9f834 commit fa51a85

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

syntax/c.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumbe
182182
syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
183183
"hex number
184184
syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
185+
if s:ft ==# 'cpp' && !exists("cpp_no_cpp14")
186+
syn match cNumber display contained "\d\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
187+
syn match cNumber display contained "0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
188+
syn match cNumber display contained "0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
189+
endif
185190
" Flag the first zero of an octal number as something special
186191
syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
187192
syn match cOctalZero display contained "\<0"

syntax/cpp.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ syn keyword cppConstant __cplusplus
3737

3838
" C++ 11 extensions
3939
if !exists("cpp_no_cpp11")
40-
syn keyword cppModifier override final
40+
syn keyword cppModifier override final auto
4141
syn keyword cppType nullptr_t
4242
syn keyword cppExceptions noexcept
4343
syn keyword cppStorageClass constexpr decltype thread_local

0 commit comments

Comments
 (0)
0