-
-
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
Vim gets very slow, the longer VSCode seems to be open #3957
Comments
UPDATE: So updating the status bar is what takes so long |
I'm still having this issue. "vim.statusBarColorControl" isn't enabled for me and it's lagging. |
Also getting a similar issue (really bad lag in INSERT mode, doesn't really have any rhyme or reason to it) and I also have |
I'm having this issue as well, and i dont have |
Yeah. I notice the typing slows down a lot. Its like it's in a bottleneck and I have to wait for Vim to catch up to what I typed. |
Wanted to bump and see if anyone had found a fix for this - it's caused me to disable the Vim extension a few times now, since switching between insert and normal mode takes so long. |
I haven't actually had Vim Code Vim slow down over time, but I have it slow down when I open a large file. |
I'm seeing a similar issue. For me, when I press J or K for like a second the cursor afterwards is still catching up while in normal mode. This is especially bad if the explorer sidebar is open. If I hide it, the performance gets better. |
Same issue. Currently the plugin is unusable for me. |
Yea, my vim plugin has running really slow, for the past few versions of vscode. I'm curious if someone else having this issue can try enabling vim in vscode insiders to see if they have the same experience? |
I was blaming vscode for this but indeed seems like its the Vim plugin. code-insiders doesn't make a difference for me. |
Same for me, I often overshoot my target code by a few lines because of that |
I am getting the same issue. |
same experience here |
Same issue here, sometimes after a while, it causes any keyboard input to not be registered at all. |
same here, especially on insert mode. |
As a temporary workaround, I noticed when uninstalling it, then reinstalling it, it will work well again. This is temporary, but at least it works. |
Bumping this, Vim plugin getting unusable, slowdown is only happens in insert mode. Process Explorer points out that there is no high CPU usage, but my memory used for the open window doubles when it slows down. |
I don't see any performance issues while keeping it open. I have it open all day on two computers - Linux Mint 19.3 and Windows 10 (build 18363.628). Some very old Windows 10 builds seem to struggle occasionally with Electron apps such as VS Code. |
I'm on mac Mojave and although I don't experience this issue all the time, it does happen from time to time and it's really annoying. I noticed it happening a lot when I was copying svg xml into JS files. |
I'm experiencing the same lag in motion. Honestly, this is one of the biggest things that makes me almost want to go back to just regular old vim! |
Also in my case I experience a very annoying lag in motion. I am starting to seriously thinking to change editor just for this. |
btw, I think my lag is because of enabling vim.foldFix. However, I really need to have the fix, so disabling it is not an option for me. |
@pianocomposer321 onivim and onivim 2 look amazing, I did not know them. However, in the meantime I found an acceptable solution with this vscode extension: neo-vim. |
I have tried the extension too (in fact, I uninstalled the vscodevim extension in favor of it), and I agree that performance-wise it is much better. However, it has the same problem that enabling vim.foldFix solved with vscodevim, which is that it opens folds when moving the cursor over them. Several issues have been opened about this, but I don't think there is currently a fix in the works. Incidentally, I believe enabling vim.foldFix is also what caused the lag on vscodevim. |
Also running into this problem, with serious lag between my typing and the characters appearing on the screen. I am using the latest version of MacOS (10.15.3), VSCode (1.42.0) and the VIM extension (1.12.4). I don't notice any difference with intellisense being triggered or not. I also notice no difference between editing a large file or a small file (I could easily reproduce my issue in a brand new file). Just to ensure that other extensions were not getting in the way, I booted up VSCode with a fresh copy of the I am sadly forced to disable this extension now because of how much this issue is getting in the way of me being able to write code. I doubt this is something that this extensions maintainers and community desire for :( |
Just out of curiosity, how many of you who are experiencing the lag have enabled vim.foldFix? |
Same problem on Archlinux, after a while it takes around a second to switch between normal and insert mode and the input lag makes it pretty unusable. I used to think that was because I always had dozens of tabs so I switched to Vscode Neovim which doesn't have this problem, now that I'm back to VscodeVim I realized the same problem also happens with few tabs if I intensively use Vscode ( 9 hours actually and it's been 1 hour since it became laggy ). Edit : 1 month and a half later without pair clorizer and colorized vim status bar and everything is fine, didn't experienced any lag |
for those Haskell programmer, |
Pylance was the issue for me (OSX 11.2) in Python files (shocker) |
@everyone |
Do check out your plugins. I used to have this problem with |
Bracket Pair Colorizer 2 here as well :-(. (mac Catalina) Switched to Bracket Pair Colorizer (original version) and it's A OK |
Happens to me every time I'm typing a Typescript type. I love having auto-complete, but this drives me nuts considering Vim commands briefly stop working all together. |
It is not only me who feel the same way. What is the fix/workaround? It is unusable because I type more bugs than code. |
Reading all "solutions" I suspect that the reason is that the running time of another extension is causing a perceived lag in the vim extension (which doesn't really explain why this happens at entering It happened to me with a large markdown file and the spell checker on Does this make any sense? |
SWITCH to VScode-Neovim ❗ ❗ ❗ |
vim mode indeed feel sluggish under vscode, I disabled all my vim plugs and only had a few key bindings for vscode in .vimrc, still, it's slow, even under normal mode. |
Test this, it worked for me: |
Worked for me as well. |
Looking over the comments, disaapointing to see this is a problem for almost 4 years. Experiencing the same problems myself. Perhaps it's an extension conflict, would be nice to see if we all have a common extension installed, besides this one. |
After several days of research around the problem, I suspect that vscode not send command directly to vim extension which cause latency and perhaps other redundant works. Then I add these keybindings to my {
{
"args": {
"after": ["a"]
},
"command": "vim.remap",
"key": "a",
"when": "editorTextFocus"
},
{
"args": {
"after": ["b"]
},
"command": "vim.remap",
"key": "b",
"when": "editorTextFocus"
},
{
"args": {
"after": ["c"]
},
"command": "vim.remap",
"key": "c",
"when": "editorTextFocus"
},
// ... from a to z. maybe from A to Z also needed.
} Adding keybindings manually is tedious. After all of these done, it seems that vscode send command to vim extension directly, navigation become smooth. Can we just add these by vim extension automatically or find root cause of the problem through this clue. |
I removed all of my non-vim keybinds and I've only once had a slowdown desync/problem. Maybe that has something to do?
|
@druskus20 Running with many extensions is one of the causes. I don't have extension development experience, but I guess that if there are many extension hosts communicating with vscode, it would make vim extension's commands being delayed to execute. |
I think VSCode VIM works on large files just fine ( > 1000 lines). its probably the typescript / javascript intellisense that is bogging it down. Whenever I open a remote repository in VSCode, it opens into a 'trusted' workspace where a lot of the extensions are disabled or limited use. Even when the file in remote repository is > 1000 lines, vim runs like a hot knife through butter. I played around turning on and off some extensions and I highly suspect its Vscode's native typescript/javascript intellisense extension. If I open a <200 line typescript file, but with heavy use of generics and complicated types, vim mode slows to a crawl. When vim is off, the normal editor works normally 🤷♂️ |
For those who come later, this affinity setting helped me out: |
For those who had problems with lagging input from the keyboard in some files, cypress helper + Vim extension together were causing this problem for me. |
microsoft/vscode#75627 (comment) Fixes it, and if that doest fix it try disabling Github Copilot, Tabnine, Codeium or any similar extension |
@mikeRead does navigating up/down by holding |
@onlurking I've had affinity set for a long time and it doesn't fix the gradual slowdown. I still suspect VSCode itself is at fault for this issue, but who knows. |
Hey @jedwards1211 I migrated to vscode-neovim quite few months ago, it has it fair share of issue (eg sync issues when using Supermaven/Copilot), but it doesn't have the same slow down problem of VSCodeVim. |
Describe the bug
Since a few days / weeks vim has become incredibly slow for me, and it gets worse the longer vscode is open. Any mode change takes around 1s when vscode is open for 1h or so, and around 2s when its open 2h or so.
This also includes using easymotion
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Performance does not degrade with time
Environment (please complete the following information):
Extension version: 1.9.0
VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:59:35.033Z)
OS version: Windows_NT x64 10.0.16299
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: