vscode-markdown
vscode-markdown copied to clipboard
Backspace and enter lag (conflicts with Spell Check)
What is the problem?
In reference to several issues, prinicipally https://github.com/yzhang-gh/vscode-markdown/issues/17, I still am experiencing this problem. The backspace and enter bug is still not solved.
Therefore, I had to remove some keyboard shortcuts of your extension, but it still did not work yet, then I had to use @VictorioBerra's tricks, it almost worked, but later it stopped of working.
How can I reproduce it?
Still the same problem that the other users have experienced.
Is there any error message in the console?
No
I am using Manjaro Linux KDE and VSCode Insiders 1.34.
Workaround
If you do not need the "list continuation" feature, you can delete some key bindings (e.g. onEnterKey
, onBackspaceKey
). See instructions at https://github.com/yzhang-gh/vscode-markdown/issues/88#issuecomment-364628067.
If you want to investigate more, you can check1 these extensions first, which are reported (probably) conflicting with Markdown-All-in-One:
- Spell Right
- Bracket Pair Colorizer 2
1. disable it and see whether the issue is gone edited by @yzhang-gh
Could you confirm whether you have tried these steps?
For the problem like "command '...' not found", please try to
- wait for a few seconds after you open a Markdown file for the first time
- doesn't work? -> update vscode
- doesn't work? -> reinstall this extension
- still doesn't work? 😵 -> please open the developer tools to see whether there is any error message, and then paste it below. (menubar>help>toggle dev tools)
@yzhang-gh !
I did not receive any "command '...' not found". No error. Only backspace and enter glitch.
But as enabling your extension, it prevents me from using backspace and enter. It also prevents me from pressing backspace and enter in the command palette sometimes.
I still can not capture and reproduce the glitch. It will take a time to capture the glitch.
When I capture the glitch, I will record and send it to you.
Besides, when I press Ctrl + Shift + P, the behaviour is strange, because when I type in the command palette and press backspace, it deletes in the text and not in the command palette.
It looks a performance issue. You can see some instructions from vscode team. Especially, "profile the running extensions" might help. Looking forward to what you can find.
It looks a performance issue. You can see some instructions from vscode team. Especially, "profile the running extensions" might help. Looking forward to what you can find.
I have just tested. No error. Strange. But I forgot of telling that I did not use a native VSCode Insiders (in the ~/usr/share/code-insiders
. I downloaded and run the bin shell of VSCode.
Let's be more specific. Could you check
- disable all extensions except for this one, does your glitch still exist?
- if it is, try "profiling the running extension" and upload the
profile.txt
so I can investigate.
- disable all extensions except for this one, does your glitch still exist?
no, it will take a time to capture the glitch.
- if it is, try "profiling the running extension" and upload the profile.txt so I can investigate.
In spite of being unable of capturing the glitch, here is the txt:
Thanks.
The profile looks normal. So I cannot do anything for now. We can take a look when you have this issue again.
The glitch appeared! I hit a Pokéball and captured the glitch at the Pokemon style! But I am suspecting that your extension is in conflict with @bartosz-antosik's vscode-spellright
due to perfomance fail of backspace and enter.
Here is the GIF:
And here is the text;
And I leave the extension txt to @bartosz-antosik:
More another glitch's Pokéball:
Second txt: markdown-all-one2.txt Second txt for @bartosz-antosik: spellright2.txt
I have just captured the error message:
Thank you Pokémon trainer. Then it is much clear. Looks like the spell checker causes the lag
You might need to report it to the spell checker author. I guess you have some custom settings for spell checking. Also telling him about that might help.
Work around: Open key bindings and delete the offending shortcut keys from markdown.extension.on'KEY'
Work around: Open key bindings and delete the offending shortcut keys from markdown.extension.on'KEY'
@ChristopherEeles , sorry, I did not understand. Are you suggesting me to do it or are you explaining the problem to him?
I also have this issue, frequently. I'm on Windows, latest version of VS Code - Insiders (happens in regular VS Code, too). I'm also on Windows 10 1809. So it's not just one platform where this occurs.
When this happens, it makes this extension all but useless. Did I follow the author's suggested steps? Yes, up to the point of uninstalling/re-installing the extension, because that's not really the problem here. This problem happens intermittently, but frequently. Closing and re-opening the document "until it works" is how I resolve it. But this is slow and painful and not something a user should need to do.
Also, regarding suggestions that other extensions' performance is causing an issue with this extension--I would suggest that while other extensions may be slow to process, this extension should be graceful enough to handle some lag. Since this happens so frequently, it would seem that this extension is a bit too eager in the amount of time it wants to allow for an action to complete?
I love the feature set of this extension--when it works. But it causes so many productivity drags, that I simply cannot recommend this extension at this time to other users. This issue has been on-going for at least a year.
@fourpastmidnight Thanks for the feedback and your efforts on trying to figure it out.
Could you please do one more test? Disable all the other extensions and try again. (This can be easily done by the following step)
and then enable this extension.
If you still have the same issue, then we need to use the CPU profile.
if it is, try "profiling the running extension" and upload the
profile.txt
so I can investigate.
@ChristopherEeles Removing the keybindings for Backspace and Enter works. Looking at the conditionals for the keybindings, I see that there were a whole lot of checks for various Vim "modes". I don't have the Vim keymap installed. Perhaps that's the issue? It's trying to figure out whether the keybinding should be utilized and, for some reason, the logic is not working properly, perhaps because I'm not using the Vim keymaps.
I also find it strange that this extension goes to such great lengths to test for various Vim keyboard mapping modes, but does not take into consideration other keyboard layouts, like Emacs, etc. The real question is, why bother at all? I don't see other extensions or built-in features using these conditions on keybindings.
And no, it's not acceptable to ask me to disable all other extensions. That's not the answer. Fix up wiring your keybindings. Make sure they work, all the time, every time.
Well, you get me wrong... It is a test to find out the root cause. I don't ask you to disable them all the time.
(Removing the keybindings is fine if you don't need the list continuation feature.)
The list continuation feature is nice. I wonder if there's something with the checking of the Vim modes? As I said, I don't have that keymap installed.
Work around: Open key bindings and delete the offending shortcut keys from markdown.extension.on'KEY'
@ChristopherEeles , sorry, I did not understand. Are you suggesting me to do it or are you explaining the problem to him?
I am suggesting a workaround in lieu of the bug fix.
Well, I just reinstated the keybindings, though editing the When
condition to remove the checks for all the Vim modes. No effect, I still get the Command 'markdown.extension.on<KEY>' not found.
error. Ugh.
I wonder if there's something with the checking of the Vim modes? As I said, I don't have that keymap installed.
I don't think so. The checking won't hurt the performance. I also don't have the Vim extension. Everything works fine for me.
And you can see from the previous posts, someone has a spellchecker extension and things break. (Actually, I use the same spellchecker but with nothing wrong.)
What I suggested above is aimed to answer two questions:
- Whether it is an internal issue of this extension
- If it is, then the CPU profile will tell us all
I did humor you and disable all extensions and re-enabled this one. Backspace and Enter do work. I have many extensions installed, but this extension consistently gives me more trouble than any other extension.
Thanks for the checking.
TBH, there may be a complex interaction between the extensions due to the vscode mechanism. You won't blame a spellchecker for the lag... But the truth is somehow it may conflict with this extension (it is not this extension alone).
What we can do is to pinpoint which one breaks this extension. Could you do the last step to find the root cause? profiling the running extension
Well, I re-enabled some extensions, and magically along the way, your extension stopped working again on Backspace/Enter. I'll try to find the exact extension.
A good way is "binary search".
- Start from all disabled
- Enable half of them, test
- Knowing which half to investigate more
- Enable/Disable a half of the remaining extensions (according to the previous results)
- ...
OK, I owe you a HUGE apology. I did find the offending extension: Windows opacity. I've seen problems with performance and this extension in the past--but it at some point got re-enabled in my VS Code instance.
So, if anyone else on this thread has this extension, disabling and reloading your VS Code window resolves this issue 100% for me.
I will edit my review at the Visual Studio Marketplace accordingly.
Glad to hear that 😉
But I do not have this extension. It is the spellright which causes conflict with this extension.
Hmm, I once had Code Spell Checker installed, and it caused me huge performance issues, so much so that I uninstalled it. So, it seems as though there is some performance aspect with respect to this issue.
All I can say is that I re-enabled all my other extensions, except Windows opacity, and everything works just fine. So, there are probably some isolated, but poor performing extensions in the marketplace causing negative interactions with other extensions, such as this one.