happiness (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) happiness

VSCodeのVimでペイン(画面(タブ))の幅をキーボードのみで変更する(winresizer的)

winresizer:https://github.com/simeji/winresizer

設定方法

  1. VSCodeを開いて、cmmand + shift + pでkeybinding.json出す
  2. 下記の設定を追加する
  {
    "key": "ctrl+shift+j",
    "command": "workbench.action.decreaseViewHeight",
    "when": "editorFocus"
  },
  {
    "key": "ctrl+shift+k",
    "command": "workbench.action.increaseViewHeight",
    "when": "editorFocus"
  },
  {
    "key": "ctrl+shift+h",
    "command": "workbench.action.decreaseViewWidth",
    "when": "editorFocus"
  },
  {
    "key": "ctrl+shift+l",
    "command": "workbench.action.increaseViewWidth",
    "when": "editorFocus"
  }

参考文献

https://github.com/microsoft/vscode/issues/23243

所感

winresizerの場合、window幅調整後、enterキー押して確定させる必要があった。 だが、VSCodeの場合は、別に戻せばいいから直接変更可能な設定にした。

気が向いたらleader + w resizeモードに入るみたいな設定もしたいねぇ。