Reputation: 14092
I've been trying to explore code folding options in Vim, and I have stumbled upon this stack-overflow question. While I have been able to put that into my vimrc
, the problem I'm having is that it doesn't fold the multi-line comments above a function. How do I solve this?
Upvotes: 7
Views: 5396
Reputation: 172500
The default syntax/c.vim
provides folding definitions. Unless you define a c_no_comment_fold
variable, this also folds multi-line comments.
To activate this, just put
:setlocal foldmethod=syntax
into ~/.vim/after/ftplugin/c.vim
.
Upvotes: 15