Fandom

Vim Tips Wiki

Talk:Customize text for closed folds

Back to page

1,624pages on
this wiki
Add New Page

Question:

Is it possible to change the fold line counter above to a word counter instead. I write novels using vim and fold my chapters. Having a word rather than a line counter would be much more useful.

Tgrignon (talk) 21:01, October 19, 2014 (UTC)

Sure! There are a few methods for getting a Word count in Vim. Just use one of those inside a function to get a word count between two lines, and use that function in your foldtext expression, passing in v:foldstart and v:foldend. --Fritzophrenic (talk) 16:33, October 20, 2014 (UTC)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki