VSCode with vim plugin handles this well with the Use Ctrl Keys option set. If you're in insert mode, ctrl + v will paste, otherwise ctrl + v will start visual mode. If you are selecting text, ctrl + c will copy.
VSCode with vim plugin handles this well with the Use Ctrl Keys option set. If you're in insert mode, ctrl + v will paste, otherwise ctrl + v will start visual mode. If you are selecting text, ctrl + c will copy.
Adding a bazillion one-off options like "Use Ctrl Keys" to avoid creating mappings, defeats the purpose of using vim, since creating mappings is the bare minimum way to configure it. (But Vim did so anyways for Windows, in the form of the "mswin.vim" plugin, which is enabled by default, causing confusion for users expecting vim to behave like vim.)
inoremap <C-V> <C-R>+
vnoremap <C-C> "+y
cnoremap <C-V> <C-R>+ vnoremap <C-X> "+ygvdIf you’re unfamiliar with registers look them up in the docs they are super useful. (Also have a look at the 0 register, e.g. “0p)
Nothing wrong with custom keybindings, obviously. But it sounds rather non-standard?
imap <C-V> <C-R>+
vmap <C-C> y
Most probably you want this as well:
cmap <C-V> <C-R>+
TIL. This goes into my vimrc right now.
The C-v (Ctrl+lowercase v) is important for literal character insertion. (Insert a tab, escape, return, etc.)
You can remap it to <C-l> (L = literal), and then use <C-c> and <C-v> without shift:
inoremap <C-l> <C-v>
imap <C-v> <C-r>+
cmap <C-v> <C-r>+
xmap <C-c> "+y