命令"粘贴和缩进.操作"在 VS Code 中找不到



我安装了一个名为粘贴和缩进的VS代码扩展,试图在复制粘贴代码时复制Sublime Text的格式行为。然后,我按照指示将以下keybindings添加到keybinding.json文件中:

{
"key": "ctrl+v",
"command": "pasteAndIndent.action",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+v",
"command": "editor.action.clipboardPasteAction",
"when": "!editorTextFocus"
},
{
"key": "ctrl+shift+v",
"command": "editor.action.clipboardPasteAction",
"when": "editorTextFocus && !editorReadonly"
}

但当我尝试用ctrl+v粘贴时,它甚至没有粘贴任何内容,并弹出以下错误消息:command 'paste and indent.action' not found in VS Code。尝试搜索错误,没有看到任何类似的内容。

使用editor.action.clipboardPasteAction而不是pasteAndIndent.action

更正插件命令:

{
"key": "ctrl+v",
"command": "extension.paste-indent",
"when": "editorTextFocus && !editorReadonly"
}

最新更新