131

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?

2
  • 2
    Also, on MacBook you cant enter REPLACE mode by pressing Insert in INSERT mode at all.
    – crollywood
    Jul 11, 2017 at 15:57
  • @crollywood's statement holds true on linux as well (at least on KDE Plasma 5) May 17 at 21:51

5 Answers 5

168

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
2
  • 2
    To 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
  • In my case, the upper case "R" is capital (Shift + R).
    – Éric
    Aug 23, 2021 at 17:49
61

You can press R and you'll get into the REPLACE mode.

4
  • 23
    Shift+R, actually. Pressing just R key (as you would do to type r) allows to replace just one letter and then goes back to NORMAL mode.
    – Melebius
    Jan 22, 2014 at 7:36
  • 29
    Possibly that's why he put R and not r.
    – user146043
    Jul 8, 2015 at 8:58
  • 2
    There is no r key on my keyboard. When I use R it only replaces one character.
    – SandRock
    Nov 23, 2020 at 16:09
  • @SandRock Vim commands indicate shift by using upper case letters and unmodified keys with lowercase letters.
    – Moberg
    Apr 28, 2021 at 13:00
14

R brings you into replace mode.

10

You have to press R to go to replace mode. For this, you must first be in non-editing mode

6

In normal mode, press Shift+R.

r will replace a single character.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.