1

I dont want to modify how the vim extension uses its own buffer (i dont want it to use the system buffer, but ⌘+C does not copy anything

I want to be able to ⌘+C in vscode to copy text to another application

I can copy to the system clipboard by right-clicking and selecting copy, but I frequently rely on ⌘+C for speed and convenience

2 Answers 2

2

So I'm not familiar with how VSCode handles their Vim emulation on Mac, but I think I know how to fix this anyways. What's I think is happening is that the cmd key is being mapped to ctrl for the purposes of vim shortcuts, and ctrl-c is "cancel operation" rather than copy.

Either way, we just need to ban that shortcut from reaching the vim plugin.

Try adding:

"vim.handleKeys":{
  "<C-c>": false
}

to your settings.json.

0

As a frequent user of vim in VSCode, I found that in the more general case, it is useful to just disable all Vim ctrl keys from overriding common operations such as copy, paste, find, etc, by adding the following to your VSCode settings.json:

 "vim.useCtrlKeys": false

See VSCode vim settings for the full list of other possible options.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .