While editing inside gVIM, whenever I press Shift+Insert, it's insert the <S-Insert> text. I'm running on Ubuntu Maverick and compile Vim from source. This is really annoying. What's wrong with my VIM?

link|improve this question

41% accept rate
feedback

1 Answer

Nothing, Vim just doesn't have a binding for this keypress.

:map <silent> <S-Insert> "+p
:imap <silent> <S-Insert> <Esc>"+pa

If this helps, add the following to your ~/.vimrc:

if has("gui_running")
    map  <silent>  <S-Insert>  "+p
    imap <silent>  <S-Insert>  <Esc>"+pa
endif

See also: registers, x11-selection, quoteplus

link|improve this answer
It's funny because I don't have that keymap before and Shift+Insert still works. I reload my OS and reuse the old .vimrc and all old plugins but now a keymap is needed. Hmm... – Phuong Nguyen Aug 14 '11 at 13:02
Also, the mapping doesn't work when I want to paste something into the command window (activated by <Esc>:) – Phuong Nguyen Sep 2 '11 at 14:39
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.