如何在Visual Studio Code中为光标移动自定义快捷键
在VS Code中自定义光标移动快捷键
- 打开快捷键设置:按
Ctrl + K+Ctrl + S,或点击左下角齿轮图标选择键盘快捷方式。 - 进入自定义配置文件:点击界面右上角的
{}图标,打开keybindings.json。 - 粘贴以下配置代码并保存:
{ "key": "ctrl+j", "command": "cursorLeft", "when": "textInputFocus && !editorReadonly" }, { "key": "ctrl+l", "command": "cursorRight", "when": "textInputFocus && !editorReadonly" }, { "key": "ctrl+i", "command": "cursorUp", "when": "textInputFocus && !editorReadonly" }, { "key": "ctrl+k", "command": "cursorDown", "when": "textInputFocus && !editorReadonly" }
- 保存后新快捷键立即生效,若出现快捷键冲突,可选择修改冲突绑定或替换原有命令。
内容的提问来源于stack exchange,提问作者Piyush Singhania
相关产品推荐
相关产品推荐

