Is there a way to see, where are opened folds in current File? I personally have the problem when opening folds and moving around, I'm not able to find the line where the fold was started from! Maybe there is an option to set a nice-looking folding-hint next to the numbers. Maybe like this:
+ 1 void myfunc(void) {
| 2 printf("Hello World\n");
| 3 printf("Goodby World!\n");
- 4 }
5
6 void anotherfunc(void)
...
it would be very nice! I already used google and also used the vim-help but found no way to do this.
Kind regards, musicmatze
Running zc in normal mode will close all the folds after using zO . The zr command will open all first-level folds in Vim, and zR will open all of the folds in the file. The zm command will re-fold the first-level folds, and zM will close all open folds in a file.
To expand the lines, put the cursor over the fold and hit spacebar (in vim terminology, this deletes the fold). (Side note: you may want to change the look of collapsed folds. My ~/.
Setting marks To set a mark, type m followed by a letter. For example, ma sets mark a at the current position (line and column). If you set mark a, any mark in the current file that was previously identified as a is removed. If you set mark A, any previous mark A (in any file) is removed.
Code or text folding, or less commonly holophrasting, is a feature of some graphical user interfaces that allows the user to selectively hide ("fold") or display ("unfold") parts of a document. This allows the user to manage large amounts of text while viewing only those subsections that are currently of interest.
Try
:set foldcolumn=1
if you want more fold columns indicators increase the number, the example below uses :se fdc=3
(the shortcut)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With