Let's say that I have a file of 100 lines, and all of the lines are folded. How would I unfold only line number 51?
- foldmethod is
manual
- All lines were folded with
1,$fold
To unfold (or open the fold) for only line 51, you would type :51 foldopen
. See :help foldopen
for more info.
zf
to fold a selection. This command takes a motion after it or a previous selection.
Eg.
zfj
to fold the line you're on and the one below.
or
after selecting a bunch on lines in visual mode (v
) use
zf
to fold the selected lines.
:%fold
creates a single fold over the whole file. You can only open or close the fold, not parts of it. You could use smaller folds or subfolds, though.