LoginSignup
2
0

vscode vim でInsertモードでカーソルを移動する

Last updated at Posted at 2019-12-20

環境

  • vscode 1.41.1
  • vscodevim 1.12.0
  • macOS Mojave 10.14.6

目的

  • Insert モードでカーソルを移動したかった(生粋のvimmer に怒られるかも...)

方法

コマンドパレット開く(⌘P) > keybindings.json 検索 > keybindings.json に下記を記述

keybindings.son
[
    {
        "key": "cmd+l",
        "command": "cursorRight",
        "when": "editorTextFocus && !editorReadOnly"
    },
    {
        "key": "cmd+h",
        "command": "cursorLeft",
        "when": "editorTextFocus && !editorReadOnly"
    },
    {
        "key": "cmd+j",
        "command": "cursorUp",
        "when": "editorTextFocus && !editorReadOnly"
    },
    {
        "key": "cmd+k",
        "command": "cursorDown",
        "when": "editorTextFocus && !editorReadOnly"
    },
]

詳細

  • cmd + l or h or j or k でInsertモードでもカーソルを移動できる

感想

勝手に挿入される)"を以前は

  1. ctrl + oで一時的にInsertモード抜ける
  2. aで1文字スキップした状態でInsertモードに戻って続きを入力

という方法でやっていましたが、ちょっとスッキリしました。

Insertモード中に1文字スキップさせる方法が私には見つける事ができなかったので、もし他に方法があるなら是非教えて頂きたいです!!

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0