Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Folding visual selected lines (`zf`)

Open alac1984 opened this issue 5 years ago • 2 comments

Is your feature request related to a problem? Please describe. In Vim we can visual select some lines and create a custom fold with zf command. In VSCodeVim it doesn't work.

Describe the solution you'd like I want to visual select a group of lines and create a fold with zf command, and after that open or close it with za. These folds need to be stored in some place, to obviously be reloaded everytime we open the code. If it could include a description of what is folded (a snippet of the code folded or even a custom description) it would be very appreciated.

alac1984 avatar May 15 '20 22:05 alac1984

VSCode doesn't allow arbitrary folding; foldable regions are defined either by the language server or by indentation (depending on config).

J-Fields avatar May 15 '20 22:05 J-Fields

It seems that this is now possible in VSCode 1.70.0 with "Create Manual Folding Ranges from Selection" and "Remove Manual Folding Ranges" https://code.visualstudio.com/updates/v1_70#_fold-selection

jonboh avatar Aug 10 '22 09:08 jonboh