Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In vim,

u = undo  
r = replace

Is there one key shortcut for redo ?

ctrl + r is a two key stroke (in my thinking),
and I often hit the wrong combination (I just recently switch to Mac)

Or is it possibile to map my own key stroke?

share|improve this question
up vote 3 down vote accepted

Of course:

:nmap r <c-r>

But I strongly recommend against you using "r" as your mapped key.

share|improve this answer
noted, but i actually hardly use the replace – ajreal Dec 12 '11 at 5:22
That should be :nnoremap just in case someday ajreal remaps c-r to some other function. – Trevor Powell Dec 12 '11 at 6:04

You could map one of the F-keys for redo by putting the following in your .vimrc

:map <F2> ^R

You can enter those special characters ( and ^R) by pressing ^V (ctrl-v) first.

For more details on entering special characters, :help i_CTRL-V

share|improve this answer

Your Answer


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.