aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2018-02-27 09:44:08 +0100
committerMax Christian Pohle2018-02-27 09:44:08 +0100
commite833449250e82ce7161fb312bef9fce594619337 (patch)
tree68e03f02a2e2a8917b2aceb4bc7f03957636ba48
parente9240eed645370fca1a5cdec19076d1374e9d86d (diff)
downloadvim-e833449250e82ce7161fb312bef9fce594619337.tar.bz2
vim-e833449250e82ce7161fb312bef9fce594619337.zip
Fixed syntax of C comments
-rw-r--r--after/syntax/c.vim7
-rw-r--r--doc/shortcuts.txt4
2 files changed, 8 insertions, 3 deletions
diff --git a/after/syntax/c.vim b/after/syntax/c.vim
index 0fa1fda..d08eabd 100644
--- a/after/syntax/c.vim
+++ b/after/syntax/c.vim
@@ -13,12 +13,13 @@ syntax match Comment "//.*" contains=Todo
13 13
14" clear default group for a cBlock so we can redefine it without the fold option 14" clear default group for a cBlock so we can redefine it without the fold option
15syn clear cBlock 15syn clear cBlock
16syn region cBlock start=/{/ end=/}/ transparent 16syn region cBlock start=/{/ end=/}/ transparent
17 17
18" multiple single line comments in a row 18" multiple single line comments in a row
19syn clear cComment
19syn match cComment /\v\/\/.*(\_.\/\/.*)+/ fold 20syn match cComment /\v\/\/.*(\_.\/\/.*)+/ fold
20 21syn region cComment start="\/\*" end="\*\/"
21 22syn region Folded start="^\/\*" end="\*\/" fold
22 23
23 24
24" let b:current_syntax = "c" 25" let b:current_syntax = "c"
diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt
index 015684e..c3c5ac1 100644
--- a/doc/shortcuts.txt
+++ b/doc/shortcuts.txt
@@ -184,6 +184,10 @@ viB:sort = sort inner block by name
184 184
185:finish = from within a viml-script: stop sourcing it 185:finish = from within a viml-script: stop sourcing it
186 186
187[substitutions]
188delete all comments: %s/\/\*\*< [^(\*\/)]*\*\///g
189remove empty lines: global/^$/d
190remove non-empty lines: v/^$/d
187 191
188[programs] 192[programs]
189gpm - cut and paste helper for the linux console (to get text from CTRL-ALT-F2 to CTRL-ALT-F3) 193gpm - cut and paste helper for the linux console (to get text from CTRL-ALT-F2 to CTRL-ALT-F3)
..