-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
za
for toggling folds does not work
#1453
Comments
#1004 this is part of what you are seeing |
Is there any work around to make code folds work? What I really wanted to do was map the space key to toggle folds like I do in vim, but VSCode seems to have nothing built in for toggling folds. |
I think this is currently impossible using the fold API. Even ignoring our issues with auto-expanding folds (which I am hopeful that #1004 (comment) can fix), all we have for folds is an API call for opening them and an API call for closing them. As there is no API call for telling us whether we are currently within a fold or not, we don't know which one to call. Actually..., I think I just thought of a hack for solving this problem. |
I was attempting to map
|
This below is my temporary solution. I would map "vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["z", "j"],
"after": ["z", "c"]
},
{
"before": ["z", "k"],
"after": ["z", "o"]
},
], I picked
|
VSCode |
Hooray 🎉 So now we can do something like this below:
For those who wish to use |
This was fixed by #4160 |
Please thumbs-up 👍 this issue if it personally affects you! You can do this by clicking on the emoji-face on the top right of this post. Issues with more thumbs-up will be prioritized.
What did you do?
Place cursor over a section I want to fold then press Z, a
From vim manual:
What did you expect to happen?
Section is folded on first press, and unfolded when pressing again.
What happened instead?
Nothing
Side Note:
Z, c doesn't seem to work well either, it closes the section but then expands again after a second or so.
Technical details:
The text was updated successfully, but these errors were encountered: