1.安裝vim插件
2.禁止vim插件覆蓋vscode的快捷鍵
3.更改vscode快捷鍵,模仿vim中需要ctrl
相關的操作加粗樣式
[
[
//關閉窗口
{ "key": "ctrl+q", "command": "workbench.action.closeActiveEditor" },
//添加窗口和移動光標到指定窗口
{ "key": "ctrl+w v", "command": "workbench.action.splitEditorRight" },
{ "key": "ctrl+w s", "command": "workbench.action.splitEditorDown" },
{ "key": "ctrl+w h", "command": "workbench.action.focusLeftGroup" },
{ "key": "ctrl+w l", "command": "workbench.action.focusRightGroup" },
{ "key": "ctrl+w j", "command": "workbench.action.focusBelowGroup" },
{ "key": "ctrl+w k", "command": "workbench.action.focusAboveGroup" },
{ "key": "ctrl+w e", "command": "workbench.action.focusActiveEditorGroup" },//光標移動到editor
{ "key": "ctrl+w t", "command": "workbench.action.terminal.focus" },//光標移動到terminal
//多行選擇
{ "key": "shift+k", "command": "editor.action.insertCursorAbove",
"when": "editorTextFocus" },
{ "key": "shift+j", "command": "editor.action.insertCursorBelow",
"when": "editorTextFocus" },
//顯示方法註釋詳情
{ "key": "ctrl+enter", "command": "toggleSuggestionDetails",
"when": "suggestWidgetVisible && textInputFocus" },
]
快捷鍵總結
動作 | 快捷鍵 |
---|---|
創建新文件 | ctrl+n |
打開文件 | ctrl+p |
註釋 | ctrl+/ |
運行程序 | shift:+enter |
顯示解釋 | ctrl+enter |
窗口內不同文件切換 | ctrl+tab |
補全提示切換 | tab |
跳出括號 | tab |
運行一行程序 | “shift+enter” |
debug
動作 | 快捷鍵 |
---|---|
開始debug | f5 |
停止debug | shift+f5 |
打斷點 | f9 |
下一步 | f10 |
進入方法 | ` |