VS Code 中的箭头键的替代? 特别是右箭头键可以在双引号之外移动,而无需将手移向箭头键。
我只是想知道是否已经有可用的快捷键来代替手动按键映射。
命令面板
中使用
Preferences: Open Keyboard Shortcuts (JSON)
打开):
{
"key": "alt+w",
"command": "cursorUp",
"when": "textInputFocus",
},
{
"key": "alt+shift+w",
"command": "cursorUpSelect",
"when": "textInputFocus",
},
{
"key": "alt+a",
"command": "cursorLeft",
"when": "textInputFocus",
},
{
"key": "ctrl+alt+a",
"command": "cursorWordLeft",
"when": "textInputFocus",
},
{
"key": "alt+shift+a",
"command": "cursorLeftSelect",
"when": "textInputFocus",
},
{
"key": "ctrl+shift+alt+a",
"command": "cursorWordLeftSelect",
"when": "textInputFocus",
},
{
"key": "alt+s",
"command": "cursorDown",
"when": "textInputFocus",
},
{
"key": "alt+shift+s",
"command": "cursorDownSelect",
"when": "textInputFocus",
},
{
"key": "alt+d",
"command": "cursorRight",
"when": "textInputFocus",
},
{
"key": "ctrl+alt+d",
"command": "cursorWordRight",
"when": "textInputFocus",
},
{
"key": "alt+shift+d",
"command": "cursorRightSelect",
"when": "textInputFocus",
},
{
"key": "ctrl+shift+alt+d",
"command": "cursorWordRightSelect",
"when": "textInputFocus",
},
但我只是使用 Windows 上的 AutoHotKey 和 Ubuntu 上的 xkbd 将我的键重新映射到更接近系统级别,这很好,因为它适用于几乎所有我的应用程序。
Ctrl + p
> Preferences: Open Keyboard Shortcuts (JSON)
并按回车键
keybindings.json
文件
keybindings
文件的末尾,这应该可以解决问题。
{
"key": "ctrl+j",
"command": "cursorLeft",
"when": "editorTextFocus"
},
{
"key": "ctrl+k",
"command": "cursorDown",
"when": "editorTextFocus"
},
{
"key": "ctrl+l",
"command": "cursorRight",
"when": "editorTextFocus"
},
{
"key": "ctrl+i",
"command": "cursorUp",
"when": "editorTextFocus"
}