There is someone in my team that swears by using some kind of GVim feature to do manually code folding.
As I'm using another editor and do not really need the folding feature, I think it only pollutes the source code with tags like:
/* {{{1 */
Convincing the person not to use this folding is not an option (got into some heated discussions before).
I'm not really a GVim guy, I'm wondering if there are not any other ways to do the folding without changing the team's code?
I would imagine he could just add the following to his .vimrc:
set foldmethod=syntax
Assuming he is using a version of VIM that supports that. :)
It only took a Google for "vim folding" to discover that Vim supports six fold methods.
syntax
, indent
and diff
all mean that the user has little control over where the folding happens. That may or may not be a problem.
marker
is a problem for you because you don't like the markers.
expr
had a little of each of those problems, depending on the expression you create.
If your man wants to define his own fold points, and store them in an separate file, it seems like set foldmethod=manual
combined with :mkview
and :loadview
would do the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With