I've been having a ridiculously hard time getting C/C++ code folding to work with set foldmethod=syntax
. To debug my issue I've stripped down my vimrc to only this:
set foldmethod=syntax
syntax on " also tried putting this first
Now when I open a cpp file, nothing is folded.
Then, doing :syntax off
followed by :syntax on
will fold the cpp file.
Any idea why that does something not already done by the trivial vimrc?