and you would like to highlight these segments in a different colour (so that you can skip them visually), add the following code in your .vimrc (colouring follows that of comments) syn region MySkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=MySkip let g:CommentDefines = "" hi link MyCommentOut2 MyCommentOut hi link MySkip MyCommentOut hi link MyCommentOut Comment map ,a :call AddCommentDefine() map ,x :call ClearCommentDefine() function! AddCommentDefine() let g:CommentDefines = "\\(" . expand("") . "\\)" syn clear MyCommentOut syn clear MyCommentOut2 exe 'syn region MyCommentOut start="^\s*#\s*ifdef\s\+' . g:CommentDefines . '\>" end=".\|$" contains=MyCommentOut2' exe 'syn region MyCommentOut2 contained start="' . g:CommentDefine
| Attributes | Values |
|---|---|
| rdfs:label |
|
| rdfs:comment |
|
| Version |
|
| dbkwik:vim/property/wikiPageUsesTemplate | |
| Previous |
|
| Category |
|
| Text |
|
| Author |
|
| Complexity |
|
| Created |
|
| ID |
|
| NEXT |
|
| Rating |
|
| abstract |
|