5

I'm using VS Code's neovim integration with neovim installed from snap. I want Y to work the same way as D and C. In ~/.config/nvim/init.vim I would add

map Y y$

How do I do this in VS Code? I've tried

    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": ["Y"],
            "after": ["y$"]
        },
    ],

and

    "vim.normalModeKeyBindings": [
        {
            "before": ["Y"],
            "after": ["y$"]
        }
    ],

but neither worked.

Gama11
  • 31,714
  • 9
  • 78
  • 100
Boris Verkhovskiy
  • 14,854
  • 11
  • 100
  • 103

1 Answers1

5

Turns out you need to specify and separate each key into an individual "", so that would be:

"vim.normalModeKeyBindings": [
    {
        "before": ["Y"],
        "after": ["y", "$"]
    }
]
goetz
  • 2,018
  • 2
  • 30
  • 33