乐于分享
好东西不私藏

vscode使用Excel插件导致codex插件无法粘贴图片

vscode使用Excel插件导致codex插件无法粘贴图片

问题:将截图ctrl+v给codex就会报错:There is not an image in the clipboard.

Ctrl + Shift + P → 输入:

PreferencesOpen Keyboard Shortcuts (JSON)

点击右上角:

然后加入下面这段:

[  {    "key": "ctrl+v",    "command": "-office.markdown.paste",    "when": "!terminalFocus && !filesExplorerFocus && resourceLangId == markdown"  }]

VS Code 官方文档说明,想移除某个快捷键规则,可以在 keybindings.json 里把命令名前面加 -;快捷键规则会根据 key 和 when 条件匹配执行。