diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2014-06-08 13:18:33 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-06-08 13:18:33 +0200 |
commit | 45273d44d4b1bd9a1be431c1a98f9046ed3a5c79 (patch) | |
tree | 7b8fa566b3da949b422804c3bb9eaf9c51b9b69e /syntax/c.vim | |
parent | e961fa80374369c9e299b333639db0dc43d1f126 (diff) | |
download | vim-polyglot-45273d44d4b1bd9a1be431c1a98f9046ed3a5c79.tar.gz vim-polyglot-45273d44d4b1bd9a1be431c1a98f9046ed3a5c79.zip |
Major update
Diffstat (limited to 'syntax/c.vim')
-rw-r--r-- | syntax/c.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/syntax/c.vim b/syntax/c.vim index 7a58ae71..09bd6020 100644 --- a/syntax/c.vim +++ b/syntax/c.vim @@ -379,8 +379,13 @@ endif syn cluster cLabelGroup contains=cUserLabel syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup -syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup -syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup +if s:ft ==# 'cpp' + syn match cUserCont display "^\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + syn match cUserCont display ";\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup +else + syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup +endif syn match cUserLabel display "\I\i*" contained |