Opening a large SVG file crashes VSCodeVim such that it enters non-vim insert mode and you can't get back to Vim.
Expected large files to not crash VSCodeVim.
It crashed.
Just how big is this file? Multiple MB?
Yeah it was around 1MB. Just discovered that this issue seems to happen when I switch between multiple files quickly/ sometimes when pasting. It gets stuck in non-vim insert mode where the plugin seems to have froze and I have to restart VScode.
@fandy have you ever tried disabling VIm ext and see how Code works with this file?
Having the same issue. Taking VS Code for a spin and as part of that testing out large text files like SQL dumps. In my case it's a 52MB, 117,876-line file.
With the VSCodeVim/Vim plugin enabled it drops to a pseudo-insert mode but I cannot move the cursor or make changes to the file using the keyboard. I can scroll, click and select using the mouse in this state.
With the VSCodeVim/Vim plugin disabled VS Code works without issue with the file. You can move around, adjust text and work with the file as you'd expect.
I can confirm that I can reproduce this.
It doesn't actually crash vscodevim (switching back to another tab makes it responsive again), but it definitely gets stuck on large files.
One thing I've been doing as a workaround is to use the Toggle Vim Mode before opening a large file.
I just updated to VSCode 1.16 (Windows, 64-bit version) and now it seems to work (tested /w 9MB log file).
(Interaction with other extensions seems to make it hang completely though..)
I can confirm that on large files (more than 10MB) all keys do nothing (I can still move the cursor using the mouse but I cannot do anything else). Disabling VSCodeVim solves the issue.
Sometimes extension just freeze at svg file. Not big one, any svg file.
Can you share an example SVG file that causes the freeze?
After you will try to insert at the end of first "path" line (where Z) I got plugin stop and high cpu

<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path d="M8,14 C11.3137085,14 14,11.3137085 14,8 C14,4.6862915 11.3137085,2 8,2 C4.6862915,2 2,4.6862915 2,8 C2,11.3137085 4.6862915,14 8,14 Z M8,15 C4.13400675,15 1,11.8659932 1,8 C1,4.13400675 4.13400675,1 8,1 C11.8659932,1 15,4.13400675 15,8 C15,11.8659932 11.8659932,15 8,15 Z"/>
<path d="M9.33736842,6 C8.81026672,5.99999272 8.31426253,6.24632136 8,6.66417212 C7.56989183,6.09936483 6.82273076,5.8685741 6.1433266,6.09066391 C5.46392243,6.31275373 5.00382583,6.93818382 5,7.64483941 C5,9.13221079 7.01157895,11 8,11 C8.98842105,11 11,9.12909261 11,7.64483941 C10.9982695,6.73834447 10.2554043,6.00342884 9.33736842,6 Z"/>
</svg>
Same happens with the following svg:
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="50px" height="201px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 51 200.787">
<g id="Layer_x0020_1">
<metadata id="CorelCorpID_0Corel-Layer" />
<path class="fil0" d="M0.0240945 91.8181l0 17.0428c4.52776,0.108425 8.23831,1.57016 11.1015,4.38319 2.83713,2.78492 4.74059,6.56173 5.70638,11.3043 0.933661,4.77874 1.44768,12.9789 1.4778,24.6045 0.0622441,11.6617 0.240945,19.2917 0.544134,23.0042 0.53811,5.91921 1.50791,10.6237 2.95559,14.1535 1.44768,3.52984 3.22866,6.34488 5.34295,8.44913 2.14039,2.14039 4.85504,3.74669 8.14394,4.85102 2.23276,0.783071 5.88709,1.17661 10.9509,1.17661l4.95343 0 0 -16.4043 -2.74677 0c-6.12602,0 -10.1699,-1.31717 -12.1918,-3.91736 -1.99181,-2.60823 -2.98772,-8.4913 -2.98772,-17.6191 0,-17.3982 -0.271063,-28.4556 -0.815197,-33.1239 -0.935669,-7.7022 -2.83311,-13.9065 -5.64012,-18.5467 -2.83913,-4.59602 -6.85087,-8.19815 -12.0392,-10.8004 6.78862,-3.81496 11.5553,-8.87882 14.3322,-15.1916 2.77689,-6.31276 4.16232,-16.9384 4.16232,-31.9131 0,-13.5833 0.12248,-21.681 0.421654,-24.3555 0.425669,-4.66831 1.57016,-7.91303 3.49972,-9.77031 1.90346,-1.81913 5.67626,-2.74677 11.2581,-2.74677l2.74677 0 0 -16.3983 -4.95343 0c-5.7626,0 -9.95504,0.534094 -12.5512,1.67457 -3.7728,1.53402 -6.87697,4.09807 -9.35067,7.7022 -2.4737,3.63827 -4.1061,8.19815 -4.82894,13.6937 -0.724843,5.52366 -1.14449,14.5491 -1.20673,27.0601 -0.0301181,12.5532 -0.544134,21.1831 -1.4778,25.9618 -0.965787,4.77874 -2.86925,8.55756 -5.70638,11.3405 -2.86323,2.7789 -6.57378,4.24063 -11.1015,4.3852z"
/>
</g>
</svg>
After pasting or when I'm trying to edit, Vim freezes.
Any updates on the issue?
FWIW if you're using the Auto Rename Tag extension, try disabling it.
I found an issue with that extension and long HTML tags where the closing tag isn't on the same line as the opening tag (self-closing tags are also affected). See https://github.com/VSCodeVim/Vim/issues/2003#issuecomment-439589594 for more info.
@ggomaeng I was able to reproduce the issue with your code snippet but went away after I modified the tags a bit. Could you try that out to see if it works?
<svg xmlns="http://www.w3.org/2000/svg" xml: space="preserve" width="50px" height="201px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 51 200.787">
<g id="Layer_x0020_1">
<metadata id="CorelCorpID_0Corel-Layer" />
<path class="fil0" d="M0.0240945 91.8181l0 17.0428c4.52776,0.108425 8.23831,1.57016 11.1015,4.38319 2.83713,2.78492 4.74059,6.56173 5.70638,11.3043 0.933661,4.77874 1.44768,12.9789 1.4778,24.6045 0.0622441,11.6617 0.240945,19.2917 0.544134,23.0042 0.53811,5.91921 1.50791,10.6237 2.95559,14.1535 1.44768,3.52984 3.22866,6.34488 5.34295,8.44913 2.14039,2.14039 4.85504,3.74669 8.14394,4.85102 2.23276,0.783071 5.88709,1.17661 10.9509,1.17661l4.95343 0 0 -16.4043 -2.74677 0c-6.12602,0 -10.1699,-1.31717 -12.1918,-3.91736 -1.99181,-2.60823 -2.98772,-8.4913 -2.98772,-17.6191 0,-17.3982 -0.271063,-28.4556 -0.815197,-33.1239 -0.935669,-7.7022 -2.83311,-13.9065 -5.64012,-18.5467 -2.83913,-4.59602 -6.85087,-8.19815 -12.0392,-10.8004 6.78862,-3.81496 11.5553,-8.87882 14.3322,-15.1916 2.77689,-6.31276 4.16232,-16.9384 4.16232,-31.9131 0,-13.5833 0.12248,-21.681 0.421654,-24.3555 0.425669,-4.66831 1.57016,-7.91303 3.49972,-9.77031 1.90346,-1.81913 5.67626,-2.74677 11.2581,-2.74677l2.74677 0 0 -16.3983 -4.95343 0c-5.7626,0 -9.95504,0.534094 -12.5512,1.67457 -3.7728,1.53402 -6.87697,4.09807 -9.35067,7.7022 -2.4737,3.63827 -4.1061,8.19815 -4.82894,13.6937 -0.724843,5.52366 -1.14449,14.5491 -1.20673,27.0601 -0.0301181,12.5532 -0.544134,21.1831 -1.4778,25.9618 -0.965787,4.77874 -2.86925,8.55756 -5.70638,11.3405 -2.86323,2.7789 -6.57378,4.24063 -11.1015,4.3852z"></path>
</g>
</svg>
Update: underlying issue on auto-rename-tag repo: https://github.com/formulahendry/vscode-auto-rename-tag/issues/32
Yeah Auto Rename Tag seems to be the issue. This happens with not only svg files, but also when programming in React and adding props in different lines.
Closing as it seems like this was a result of a different extension.
Most helpful comment
After you will try to insert at the end of first "path" line (where Z) I got plugin stop and high cpu

<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <path d="M8,14 C11.3137085,14 14,11.3137085 14,8 C14,4.6862915 11.3137085,2 8,2 C4.6862915,2 2,4.6862915 2,8 C2,11.3137085 4.6862915,14 8,14 Z M8,15 C4.13400675,15 1,11.8659932 1,8 C1,4.13400675 4.13400675,1 8,1 C11.8659932,1 15,4.13400675 15,8 C15,11.8659932 11.8659932,15 8,15 Z"/> <path d="M9.33736842,6 C8.81026672,5.99999272 8.31426253,6.24632136 8,6.66417212 C7.56989183,6.09936483 6.82273076,5.8685741 6.1433266,6.09066391 C5.46392243,6.31275373 5.00382583,6.93818382 5,7.64483941 C5,9.13221079 7.01157895,11 8,11 C8.98842105,11 11,9.12909261 11,7.64483941 C10.9982695,6.73834447 10.2554043,6.00342884 9.33736842,6 Z"/> </svg>