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?
5 Answers
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
-
2To tack on to the accepted answer: If its a number you are trying to increment,
^
+a
will increment the number and^
+x
will decrement it. Apr 18, 2016 at 7:01 -
You can press R and you'll get into the REPLACE mode.
-
23Shift+R, actually. Pressing just
R
key (as you would do to typer
) allows to replace just one letter and then goes back to NORMAL mode.– MelebiusJan 22, 2014 at 7:36 -
29Possibly that's why he put R and not r.– user146043Jul 8, 2015 at 8:58
-
2There is no
r
key on my keyboard. When I useR
it only replaces one character.– SandRockNov 23, 2020 at 16:09 -
@SandRock Vim commands indicate shift by using upper case letters and unmodified keys with lowercase letters.– MobergApr 28, 2021 at 13:00
You have to press R to go to replace mode. For this, you must first be in non-editing mode
Insert
in INSERT mode at all.