8000 dec, hex, bin literals with quote as separator · ATANU50/vim-cpp@9cf35d1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9cf35d1

Browse files
committed
dec, hex, bin literals with quote as separator
1 parent 178e581 commit 9cf35d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
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"

0 commit comments

Comments
 (0)
0