Ray Whiteside
Ray Whiteside

Reputation: 23

Changing VIM Visual Block Shortcut

I want to change the shortcut for visual block from Ctrl-v to something else. The issue is I am using a text expansion program on my base OS that is using the Ctrl-V shortcut for paste into my VNC session. If I change my paste shortcut in my VNC OS then my text expansion doesn't work.

Currently if I press Ctrl-v in vim then it pastes text, and if I press Ctrl-q then nothing happens. What is the easiest way to get my visual block functionality back without losing my text expansion, likely by changing the shortcut for visual block?

Upvotes: 1

Views: 1488

Answers (1)

Ben Klein
Ben Klein

Reputation: 1949

You can remap it. I use line-wise visual mode more often than “character-wise,” so I have this in my ~/.vimrc:

nnoremap v V
nnoremap V v

You could do something similar with Ctrl-v:

nnoremap v <c-v> " remap `v` to `Ctrl-v`

Upvotes: 2

Related Questions