2

This question already has an answer here:

I have the following in my .vimrc (I don't recall where I found the original):

" Cut, Copy, Paste
vnoremap <S-Del>        "+x
vnoremap <C-Insert>     "+y

If I use Shift+Cursor keys to select some text and then press Ctrl+Ins to copy that text to the X11 clipboard, it works fine in gVim, but not in Vim.

Further investigation (using noremap <Leader>y "+y) suggests that there's nothing wrong with the clipboard support, but rather something wrong with the keybinding.

I confirmed this by:

noremap <Leader>p :echo 'hello'<CR>
noremap <C-Insert> :echo 'hello'<CR>

The former works; the latter does nothing.

Linux Mint 18.3, Cinnamon, Gnome Terminal

marked as duplicate by Herb Wolfe, Naumann, Rich, statox Dec 13 '17 at 12:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Not a duplicate: It appears to be the Ctrl+Ins that's not working in Vim, rather than the "+y. – Roger Lipscombe Dec 13 '17 at 9:42
  • I've edited my question to be about the keybinding, rather than the clipboard. – Roger Lipscombe Dec 13 '17 at 9:49
  • @Rich, yeah, that looks like the problem. Sigh. I was kinda enjoying using vim in a terminal window, but it's gonna be hard to retrain my CUA-fingers. – Roger Lipscombe Dec 13 '17 at 10:09
  • It's terminal related issue. <C-Insert> catched by your terminal. Actually any <Ctrl> and <Alt> mappings. – Alex Kroll Dec 14 '17 at 8:34

Browse other questions tagged or ask your own question.