How to switch to REPLACE mode in VIM

zeroos picture zeroos · Feb 9, 2012 · Viewed 58.1k times · Source

I know I can do this by pressing Insert in INSERT mode, but that requires some stretching. Is there any more convenient shortcut to go directly from NORMAL mode to REPLACE mode?

Answer

hochl picture hochl · Feb 9, 2012

From the ViM manual:

5. Replace mode                         *Replace* *Replace-mode* *mode-replace*

Enter Replace mode with the "R" command in normal mode.

Of course you can map any key to R, for example by doing

:map <F5> R