You can add folding capability to C-style comments using the command: au BufNewFile,BufRead *.cpp,*.c,*.h,*.java syn region myCComment start="/\*" end="\*/" fold keepend transparent This will work on C, .h, C++, and Java files. The "keepend" and "transparent" commands are necessary to avoid overriding the default syntax highlighting of comments. If you want to keep the "/*" beginning of the comment in the folded text, you can use the following function: The resulting line should look about the same as the default, without removing the comments.
| Identifier (URI) | Rank |
|---|---|
| dbkwik:resource/rtj7yvrWMLdFKJJkSIBKRA== | 5.88129e-14 |