Open titouandk opened 7 months ago
you can do it with keymaps:
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
// put key-bindings here if you want them to work in normal & visual mode
"g f": "editor::Fold",
"g u": "editor::UnfoldLines"
}
},
@rauann I might be wrong, but it seems to me that this solution has 2 problems:
gu
and gf
are already existing vim commandBump! Would love this feature.
Also bump - Feels quite strange not being able to easily fold and unfold things. Are we able to hook the editor's folding controls (To enable the LSP to do a majority of the lifting work and defer to the indenting set there?)
Yes we absolutely need editor::ToggleFold
!
Check for existing issues
Describe the feature
VSCode has a nice Vim command
za
to fold / unfold code under cursor.(This is not a native Vim behavior - Vim is natively more restrictive as you must have an existing fold for this to work.)
https://github.com/zed-industries/zed/assets/5413308/ed95f73c-7f77-4589-a79d-56bab93e716d
This works for all languages, as in markdown:
https://github.com/zed-industries/zed/assets/5413308/1e56ab80-f43b-4703-9e8d-3cf0a59170cc
If applicable, add mockups / screenshots to help present your vision of the feature
No response