0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCode-Neovimのctrl-u, ctrl-dの挙動を直したい

Posted at

概要

VSCode-NeovimはVSCodeでVim(Neovim)を使えるようにするスーパープラグイン💫です。

最近導入して愛用していましたが、Ctrl-DとCtrl-Uの挙動が、普通のVimだと「カーソルがページ半分だけ上/下に移動する」だったのが、VSCode-Neovimだと「ページ半分だけ上/下にスクロール(カーソルは移動しない)」に変わっていて気になったので、直し方を紹介します。

直し方🛠️

以下をkeybindings.jsonに記述します。

keybindings.json
{
    "key": "ctrl+d",
    "command": "vscode-neovim.send",
    "args": "<C-d>",
    "when": "editorTextFocus && neovim.init"
},
{
    "key": "ctrl+u",
    "command": "vscode-neovim.send",
    "args": "<C-u>",
    "when": "editorTextFocus && neovim.init"
}

完成!

おまけ: ctrl-f, ctrl-bも直したいとき

上の設定のd, uをf, bに変えて追記!

keybindings.json
{
    "key": "ctrl+f",
    "command": "vscode-neovim.send",
    "args": "<C-f>",
    "when": "editorTextFocus && neovim.init"
},
{
    "key": "ctrl+b",
    "command": "vscode-neovim.send",
    "args": "<C-b>",
    "when": "editorTextFocus && neovim.init"
}

完成!!

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?