Based on @lis2 answer, I use a simpler configuration that will not force Insert mode at the end:
" Copy and pasteif has('clipboard') && !has('gui_running') vnoremap <C-c> "+y vnoremap <C-x> "+d vnoremap <C-v> "+p inoremap <C-v> <C-r><C-o>+endif
Mind that all these override default Vim mappings:
v_CTRL-C
: stop Visual modev_CTRL-X
: subtract [count] from numberv_CTRL-V
: blockwise Visual modei_CTRL-V
: insert next non-digit literally, which is also mapped toi_CTRL-Q
As an alternative, one can use keys inspired in the "yank", "delete" and "put" Vim verbs: <C-y>
, <C-d>
and <C-p>
respectively. These would only override one default mapping:
i_CTRL-P
: backwards search keyword for completion