Questions tagged [vim-folding]

5 questions
2
votes
1 answer

How to remove the fold level numbers in vim?

I'm using NeoVIM, and I set up it to show folds automatically. The trouble is that when there is more than one level of folds, it's going to show numbers at the left. Is there any way to remove them, just look like any other modern editors? I…
Stone Sun
  • 21
  • 2
1
vote
1 answer

Set foldlevel in part of file in vim

Setting foldlevel when folding is active displays all folds up to that level and closes the rest.* I would like to do something similar for only part of the file, perhaps all material below the current fold or all material in a range. Consider this…
Ross Boylan
  • 21
  • 1
  • 5
1
vote
1 answer

Why does creating a new fold sometimes cause the entire file to be folded?

Sometimes when I create a new fold in vim, it folds the entire file. Why? (foldmethod=manual) e.g., zi (all folds are now open) zi (all folds are now closed) lines 1-309 are folded closed, and lines 617-662 are folded closed (file has 662…
Rob Bednark
  • 25,981
  • 23
  • 80
  • 125
1
vote
1 answer

How to show open folds?

How can I show open folds in vim? (i.e., folds that are currently open) e.g., show the open folds within the text somehow, like marking the lines; or perhaps show them as a list (e.g., like the :jumps command that shows a list of jumps)
Rob Bednark
  • 25,981
  • 23
  • 80
  • 125
0
votes
0 answers

Vim - how to fold indented lines into parent line, not underneath it

With foldmethod=indent I can take this text: 1. Heading 2. item one 3. item two 4. itme three and fold lines 2, 3 and 4 to achieve this: 1. Heading 2. ------------------------------------------ where the dotted line is the collapsed…