Map Shift-Insert in Vim

8

I am trying to map Shift-Insert to paste command by adding this line in vimrc

nnoremap <S-Insert> "+P

But it does not change anything.

If I put other shortcut like (<S-I>) it works well.

Ramesh

Posted 2010-11-24T19:06:56.063

Reputation: 105

1I think X is capturing it before its getting to Vim. So vim might be configured for that sequence, but it never sees it. I think there is a way to turn off these kinds of things in X, but someone else will have to chime in for that. – deltaray – 2010-11-24T19:14:52.613

1We need to know what operating system you're using and whether you're using console Vim or gVim. Console Vim under *nix cannot see the Shift+Insert key combination, due to limitations in (n)curses and terminal emulation; that is, it's not Vim's fault. – Heptite – 2010-11-24T20:29:08.127

I doubt he is using gvim. Key recognition is a recurrent problem with vim, unlike gvim. (I don't say this is a vim issue though. It's tied to the terminal) – Luc Hermitte – 2010-11-25T10:25:46.167

Answers

10

Try putting following lines in .vimrc

" Make shift-insert work like in Xterm
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>

I had the same problem and after putting this lines in .vimrc shift insert works like a charm. Refrence:http://tech.groups.yahoo.com/group/vim/message/104539

yagnesh

Posted 2010-11-24T19:06:56.063

Reputation: 101

1

Try putting following lines in .vimrc

" Paste yanked text
map <S-Insert> <C-r>"
map! <S-Insert> <C-r>"

ideasman42

Posted 2010-11-24T19:06:56.063

Reputation: 591