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.

Is there a way to map paste to control+shift+v, and leave visual block mode as control+v in gvim?

I use both quite often.

share|improve this question

2 Answers 2

This is not an authoritative answer, but there doesn't appear to be any way to distinguish between Ctrl+Shift+<letter> and Ctrl+<letter> in gvim.

I tested this using gvim 7.3.138 for Windows and gvim 7.3.189 for X on Linux. I entered insert mode, typed Ctrl-V to insert the next key literally (see ":help i_CTRL-V"), then typed Ctrl-V. The result appeared as ^V. I repeated the experiment, typing Ctrl-Shift-V at the end. The result again appeared as ^V.

There is also a to-do item (":help todo.txt") that suggests that handling the two cases separately is not implemented but is being considered.

8 Should mapping <C-A> and <C-S-A> both work?

share|improve this answer

<C-v> already does what you want.

For the other one it's going to be more complicated: Some (most?) terminals treat <CONTROL><SHIFT> exactly like <CONTROL>. So <CONTROL><SHIFT>v will probably work in GVim but the the mapping will be useless in regular vim.

Also, which "paste" do you want to map: p or P or "_dP or another one?

share|improve this answer

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.