Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Foldmethod=marker, how to customize?

Tags:

vim

With foldmethod=marker folded portions appear like this:

+--27 lines: First section
+--16 lines: Second section
etc ...

How can I get rid of the +--XX lines: ?

like image 241
Running Turtle Avatar asked Sep 01 '26 19:09

Running Turtle


1 Answers

You can change the text displayed for a fold by defining a custom function that generates the text you want displayed and changing the foldtext option to call your function.

Take a look at jpython_fold.vim for an example of this.

Also see :help 'foldtext'.

like image 168
Randy Morris Avatar answered Sep 04 '26 09:09

Randy Morris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!