vscodeでVimを導入し、インサートモードを設定する
概要
vscodeにvimを導入したものの、下に移動するコマンドj
が使えなくて試行錯誤したのでメモする。
環境
keybindings.jsonファイルを開く
code => Preferences => Keyboard Shortcutsへ移動
ここのextension.vim_escape
コマンドをEscape
にしたいのだが、編集をしてesc
コマンドを打つと、なぜか終了してしまい、うまく設定できない。そこで以下の赤く囲われているところをクリックしてkeybindings.json
ファイルを開く。
keybindings.jsonファイルの編集
keybindings.json
ファイルを以下のように変更。
// Place your key bindings in this file to override the defaultsauto[] [ { "key": "escape", "command": "extension.vim_escape", "when": "editorTextFocus && vim.active && !inDebugRepl" }, { "key": "escape", "command": "-extension.vim_escape", "when": "editorTextFocus && vim.active && !inDebugRepl" }, { "key": "tab cmd+", "command": "jumpToNextSnippetPlaceholder", "when": "editorTextFocus && hasNextTabstop && inSnippetMode" }, { "key": "tab", "command": "-jumpToNextSnippetPlaceholder", "when": "editorTextFocus && hasNextTabstop && inSnippetMode" } ]