Home>

I want to be able to select everything with Ctrl + A in VSCode Vim and copy with Ctrl + C.
Please teach me.
I would like these operations to work in normal mode.

Tried

The vim copy command can now be set to copy to the clipboard.

Search with "vim.useSystemClipboard" in [File] menu->[Basic Settings]->[Settings].
Edit ""vim.useSystemClipboard" ;: false" in the search results and change the user settings to
Set to ""vim.useSystemClipboard" ;: true".

How to set key binding for Ctrl + A and Ctrl + C.
Halfway through, I understood the following steps.

Search for "vim.normalModeKeyBindings" in [File] menu->[Basic Settings]->[Settings].

I don't know how to write this.
Please teach me.

Added.

Ctrl + A may not work because it overlaps with Vim's original increment command.

"vim.normalModeKeyBindings": [
        {
            "before": [
                "<C-c>"
            ],
            "after": [],
            "commands": [
                {
                    "command": "Copy Selection"
                }
            ]
        }
    ]
  • Answer # 1

    Maybe you should do the same thing?
    https://qiita.com/carnelia0702/items/a2c9f9932ec469b46acb

    "vim.normalModeKeyBindingsNonRecursive": [
            {
                "before": [
                    "<C-a>"
                ],
                "after": [],
                "commands": [
                    {
                        "command": "Select All"
                    }
                ]
            },
    ]


    In the"before"part, what VSCode operations can be performed with vim keybinding and"commands"?

    I think you can do the same thing, copy (Ctrl + C).

    Y_waiwai also says, but after a little more research, I think that the desired answer was requested.

  • Answer # 2

    If you go through "vscode keybinding change", it will come out variously.