Questions tagged [foldtext]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
29 views

Using a single carret character as the fold character in Neovim using Lua

I am using Neovim v0.9.5 and configured this editor using Lua. I'm searching for a way of using a single caret down (▾) character for folds. Here is what is currently used by Neovim by default. ** ...
Amin NAIRI's user avatar
1 vote
0 answers
162 views

Is there a recommended way to recompute folds every time a buffer is changed in Neovim?

According to the documentation, the only command that recompute folds is the zx command. However, the problem is that zx automatically undoes all manually opened or closed folds. If I have a bunch of ...
Anthony's user avatar
  • 111
1 vote
0 answers
21 views

foldtext seems to be recalculated across all folds every time you move the cursor line

With manual folding. Using a system call to put a line/char/word/ count for the text within each fold: :set foldtext=system('wc',getline(v:foldstart+1,v:foldend)) the command works (if you ignore for ...
markling's user avatar
  • 319
0 votes
2 answers
41 views

Copy text from all folds, excluding titles

How do I copy all lines from all folds, excluding the fold titles?
markling's user avatar
  • 319
1 vote
1 answer
24 views

Count words in range excluding fold titles

Manual folding has just come as a revelation to me while trying to edit a large text file. The folds define helpful meta-titles for sections of the text. I need a precise word count, but it cannot ...
markling's user avatar
  • 319
0 votes
0 answers
41 views

Foldtext not making any difference to text displayed in closed fold

I changed the value of the foldtext option to change the text displayed in a fold, and it made no difference. I have a short file in which I defined a manual fold containing two lines, with the ...
markling's user avatar
  • 319