I'm trying to fold my c++ code.
Google told me that I should set foldmethod=indent
. But this is not what I need.
set foldmethod=indent
makes all of folds happen automatically when I enter a c++ file. And zc
and zo
will fold/unfold all of functions. But what I need is that:
- Don't fold automatically when I enter a c++ file;
- I only want to fold the function in which the cursor is.
Is it possible to do so?
foldmethod=syntax
which is set by standardftplugin
?fdm=syntax
is not set by default. That's my private setting.