A lot of operator like delete
, change
, indent
, switch-case
accept a motion to apply on.
For example, let say I want to replace the current word with all letter a
, I do:
viwra
Compared to the imagined:
riwa
Why isn't it the same for the replace
command?
It's obviously by design, do you know the reason behind this choice?
viwra
. Uppercase 'R' replaces the whole line regardless of what's visually selected.r
is a command, not an operator. Operators operate on a text-object or motion but that's not the case forr
, likei
ora
oro
.graiw
be better? Would be similar tog~iw
. I don't think the behaviour you want is better than being able to replace the current character with two keystrokes.