Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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

share|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
add comment

I've found out that Shift+ Insert does not work in gVim if :set paste is active. Instead of inserting the clipboard contents, it will insert the text "<S-Insert>". Normal (console) vim does not suffer from this problem, probably because shift-insert is a terminal thing in that case, and not something handled by Vim.

The solution for me was to turn off paste mode: :set nopaste.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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