Open an .md file. Enter any character and press Enter. prompt:command 'markdown.extension.onEnterKey' not found.
But you can delete the selected character or text
After the text or character, click Wrap. prompt:command 'markdown.extension.onEnterKey' not found
请至少先稍微看下说明
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. (VSCode Menu Bar -> Help -> Toggle Developer Tools)
Same thing happens with backspace.
command 'markdown.extension.onBackspaceKey' not found
Interesting, shift+enter inputs an enter, and shift+backspace inputs a backspace.
我这里出现了完全相同的现象。所有功能都无法使用,快捷键都会报错
比如command 'markdown.extension.editing.toggleBold' not found
更新之后问题消失了,应该是版本的问题
The latest version of this extension (v1.5.1) added the compatibility to vscode earlier than v1.24.0
找到问题了,我的vsCode版本太旧。
之前用vsCode 1.22版本,检查更新,提示没有可用更新。我以为是最新版本。去vsCode官网下载了1.25.1版本就好了。
嗯嗯,不过我后来更新插件之后应该也可以兼容旧版本了
好了就行
@neilsustc This issue seems to be recurring and is affecting a lot of people. I read the steps you have mentioned and my issue is resolved. Just that I have to wait too long. Could you say why is it? Do you think that the Microsoft VScode team could help us?
Your extension is excellent, just that this isssue is little frustrating.
How long do you need to wait? It should be only a few seconds and only for the first time you open a Markdown file, then everything should work well.
For your case (that can be resolved by waiting for a while), the root cause is vscode only loads extensions when they are needed. If you press enter etc. during the few seconds when the extension is being activated, this error will be thrown out.
Another common reason is the internal API change in vscode.
I have already resolved it (catch the version mismatching and then show warning rather than throw error) in the latest version. So this case will never happen again.
It takes me about 12 to 15 seconds. I am using the latest version of the app.
Also, it gets stuck a couple of times in the middle out of nowhere, again we have to wait for sometime.
Thanks for letting us know what is causing this issue.
Surprised that the recent one let me waiting for over a minute!
What is "getting stuck"? I guess it is the editor gets unresponsive but no error is raised, right?
If it is the case, it might be another issue #181.
I get this issue on 64-bit windows portable build (i.e. installed from zip), VS Code 1.23.1 and 1.25.1. Waiting for several minutes doesn't fix the problem.
The following stack trace is in the dev tools:
/E:/Tools/VSCode/resources/app/out/vs/workbench/workbench.main.js:270 [Extension Host] Here is the error stack: Error: command 'markdown.showPreview' already exists
at e.registerCommand (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:696:618)
at Object.registerCommand (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:768:949)
at CommandManager.registerCommand (e:\Tools\VSCode\resources\app\extensions\markdown-language-features\out\commandManager.js:26:47)
at CommandManager.register (e:\Tools\VSCode\resources\app\extensions\markdown-language-features\out\commandManager.js:19:14)
at activate (e:\Tools\VSCode\resources\app\extensions\markdown-language-features\out\extension.js:44:20)
at Function.t._callActivateOptional (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:791:650)
at Function.t._callActivate (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:791:329)
at e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:790:391
at Object.g [as _notify] (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:77:729)
at Object.enter (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:81:61)
at n.Class.derive._oncancel._run (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:866)
at n.Class.derive._oncancel._completed (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:307)
at c (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:85:785)
at $.then.o.(anonymous function) (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:85:999)
at Object.g [as _notify] (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:77:729)
at Object.enter (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:81:61)
at n.Class.derive._oncancel._run (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:866)
at n.Class.derive._oncancel._completed (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:307)
at c (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:85:785)
at $.then.o.(anonymous function) (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:85:999)
at Object.g [as _notify] (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:77:729)
at Object.enter (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:81:61)
at n.Class.derive._oncancel._run (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:866)
at n.Class.derive._oncancel._completed (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:307)
at e.resolveOk (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:554:1000)
at e._receiveReply (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:657:394)
at e._receiveOneMessage (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:656:693)
at e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:655:544
at e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:658:673
at e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:96:599
at e.fire (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:97:917)
at u (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:159:721)
at Socket.<anonymous> (e:\Tools\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:159:898)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at Pipe.onread (net.js:560:20)
/E:/Tools/VSCode/resources/app/out/vs/workbench/workbench.main.js:270 [Extension Host] Extension 'yzhang.markdown-all-in-one' failed to activate. Reason: dependency 'vscode.markdown-language-features' failed to activate.
If I search for other installed extensions with @installed markdown, I get
Is this somehow clashing with the built-in preview command?
EDIT I get this with lots of keys (enter, backspace, etc). I've also tried uninstalling and reinstalling the extension, restarting VS Code and the PC, etc. The only work around appears to be to uninstall the extension.
@will-hart It is a pure vscode issue as it says Extension 'yzhang.markdown-all-in-one' failed to activate. Reason: dependency 'vscode.markdown-language-features' failed to activate.
You can report it to the vscode repository.
Adding my experience: got markdown.extension.onBackspaceKey today, restarting VSCode seems to have fixed it (for now).
I just faced command 'markdown.extension.onEnterKey' not found, restarting VSCode fixed it but I found it repeated many times (just Google to count). My question is why this issue keep happening?
Thanks,
The most common case is that this extension isn't fully loaded at the time you press the keys.
(This is because of the VSCode's "lazy loading" mechanism. We have two activation events now: 1. the first time you open a Markdown file; or 2. your folder contains README.md)
After being activated (usually several seconds), it should work well.
Other cases are the extension fails to activate. These happened a lot before because this extension used to depend on a VSCode built-in extension which might change from time to time. For now, this extension should be more robust (no independency anymore).
It was likely the other cases since I tried to press many keys but only Enter failed.
look at the left sidebar of Extensions,the Markdown All in One extension has been upgraded, reload it will resolve the problem.
I still have the same problem.
Latest version of VS Code and the extension to date (2019-06-12).
Thanks for the feedback. However, this thread is too out of date. I am going to lock it so we don't bother the other people.
@fleed Please feel free to open a new issue for your problem. It would be better if you can check the developer console to see whether there is any error. (VSCode Menu Bar -> Help -> Toggle Developer Tools)
Most helpful comment
The most common case is that this extension isn't fully loaded at the time you press the keys.
(This is because of the VSCode's "lazy loading" mechanism. We have two activation events now: 1. the first time you open a Markdown file; or 2. your folder contains
README.md)After being activated (usually several seconds), it should work well.
Other cases are the extension fails to activate. These happened a lot before because this extension used to depend on a VSCode built-in extension which might change from time to time. For now, this extension should be more robust (no independency anymore).