telesoho / vscode-markdown-paste-image

Smartly paste for Markdown.
MIT License
135 stars 41 forks source link

How to configure this feature only come into force in the md files?如何配置只在md文件生效呢 #38

Closed w15971597 closed 3 years ago

w15971597 commented 3 years ago

我希望仅在编写md文件时能够启用您的插件,在编写其他格式比如代码时仅粘贴raw text I want only to write the md files can enable your plug-in, in other formats such as code only paste raw text (我已经将插件的快捷键改为了cmd+v,以便于统一按键)

telesoho commented 3 years ago

插件启动是通过调用"Markdown Paste"命令启动的,不调用这个命令,插件就不会启动的.

JeffersonQin commented 3 years ago

这个是有办法在package.json中的contribution字段解决的,我过两天提个pull request

telesoho commented 3 years ago

明白你的意思了,看到了这个文档。 ontributes.keybindings 按照下面修改可以让MarkdownPast命令只在markdown模式下生效。

 {
        "command": "telesoho.MarkdownPaste",
        "key": "ctrl+alt+v",
        "mac": "cmd+alt+v",
        "when": "editorTextFocus && resourceLangId == markdown"
 }

下个版本对应这个问题。

telesoho commented 3 years ago

我已经在0.13.4版本中追加了限定Markdown Paste命令只在Markdown模式下生效。