I have gotten into the habit of using ctrl+f to move forward a character when staying in insert mode while using the vim mode in various editors. I don't like using the arrow keys or hopping out of insert mode/moving a character with a motion command/getting back into insert mode. How do I make that shortcut work in VS Code? I also often will use ctrl+b to move backwards a character, but this is less important. I'm open to other suggestions, btw, for moving around while in insert mode without the arrow keys.
答案 0 :(得分:2)
在keybindings.json中:
{
"key": "ctrl+f",
"command": "cursorRight",
"when": "editorTextFocus"
},
{
"key": "right",
"command": "-cursorRight",
"when": "editorTextFocus"
}
重现的步骤:
Ctrl - K Ctrl - S 打开键盘快捷键(或单击齿轮图标)左下)。
向右搜索光标。
鼠标悬停"右移光标",点击" +"或"笔"编辑图标。
在弹出对话框中输入所需的键绑定,然后按enter键。
Vscode会自动在keybindings.json文件中生成上面的键绑定。