-
-
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
Solution for VSCodeVim code folding issue (solves #1004) #4517
Comments
BUG Using this method, the cursor goes through the code, but for some reason now, the cursor resets back to line 1 or 2 of the file. Maybe someone who knows the system well could look into it? Thanks. |
Found a temporary fix. After using Then go on using Pressing escape somehow ensures that the cursor remains at the desired position and doesn't jump to line 1 or 2 of the code. |
UPDATE -> GOOD NEWS ! I went over the code and wasn't happy with the rapid vim toggles. It is still working. And this doesn't have the bug where the cursor jumps to line 2 or 1. Now settings.json just needs : "macros": {
"vimAltDown" : [
"cursorDown"
],
"vimAltUp" : [
"cursorUp"
]
} |
Which means you don't need the macros! |
No. What is different in this macro is that it seems to work without rapidly toggling vim on and off.
But I get where you are coming from. It might be possible to just remap the |
That's exactly what I meant - the whole point of the macros is to do more than one command by calling just one custom command. A macro that calls only one command is pointless. Instead, you could do:
|
Love this. |
Yes. I have been using it for a while. It also solves the lag that I had been experiencing. The one caveat is that it breaks counts like |
Was having the same issues and was brought to this thread. Took the provided solution and had to modify it for what I assume is a later version of the extension.
|
folding fix is terrible. just use these to step over folded places. {
"key": "alt+j",
"command": "cursorDown"
},
{
"key": "alt+k",
"command": "cursorUp"
} |
Solves->
#1004
Introduction->
First of all, thank you for this amazing plugin.
Without a vim plugin, I wouldn't be using vscode.
Thank you very much for your hard work.
Problem ->
vscode vim folding has been an issue for a lot of time and, AFAIK vscode devs havn't fixed the issue and it seems they don't plan to provide the required API to solve these issues.
This has been probably the most requested feature ( #1004 ) for VSCodeVim but due to the negligence of support from core vscode team, I was going to leave vscode behind, out of frustration.
Discussion ->
But I didn't want to leave vscode.
So I came up with a solution myself.
I don't know if it is the "best" solution. It works for me. And I plan to continue using it.
I'm sharing here in hope that if someone else is facing the same problem, they are able to solve the issue and enjoy using vscode.
I'm not noticing any performance degradation due to using this fix, but it's a dirty fix nonetheless.
Use->
alt+j
to move down.alt+k
to move up.Solution ->
I used macros to setup alternative ways to move up and down which didn't have the code folding issue.
I downloaded this macro plugin : <<< LINK >>>
I included the following setting into settings.json
I added the following to keybindings.json
How it works ->
I used the macro library to setup proper macros that would toggle out of vim mode, move the cursor down or up and toggle vim on again.
When vim mode is toggled off, the cursor can move up and down without expanding the code folds.
Request->
If this is suitable for your needs, could you please include the solution in a more official way?
Thanks
The text was updated successfully, but these errors were encountered: