使用 Visual Studio Code 的过程是:
-
Remap a built in command's keyboard shortcut. For example, say, Open File (default is Ctrl+O, it's unlikely that anyone would actually change this, but the same process should probably apply for any built in shortcut).
-
Remap an extension command's keyboard shortcut, say the Bookmark extension's toggle-bookmark (default Ctrl+Alt+K)
2015 年,这涉及到编辑配置 JSON 文件,但我不知道是哪一个,也不知道如何编辑。 2021 年有新的 UI,我如何找到它?
Click File -> Preferences -> Keyboard shortcuts. Use the tab that opens up to edit and find available key bindings and assign them.
打开keybindings.json
使用选项卡栏中的按钮文件(下面的屏幕截图)
历史记录:在 Visual Studio Code 的早期版本中,您可以单击“文件”->“首选项”->“键盘快捷键”,您将获得如下所示的 JSONkeybindings.json
:
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+o", "command": "workbench.action.files.openFile" },
{ "key": "ctrl+alt+k", "command": "bookmarks.toggle", "when": "editorTextFocus" }
]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)