"C-r" in visual mode "r" command

Frank Fischer frank.fischer at mathematik.tu-chemnitz.de
Fri Sep 23 08:35:45 CEST 2011


On Thu, Sep 22, 2011 at 05:16:48PM -0400, York Zhao wrote:
> I have the following text:
> 
> 1 Bar
> 1 Bar
> 1 Bar
> 1 Bar
> 1 Bar
> 1 Bar
> 1 Bar
> 1 Bar
> 
> 1. Yank the strings "Foo"
> 2. Make an rectangle block to select the first column "1"
> 3. Press "r"
> 4. Press "C-r " followed by `"'
> 5. I expect the text to become the following:
> 
> Foo Bar
> Foo Bar
> Foo Bar
> Foo Bar
> Foo Bar
> Foo Bar
> Foo Bar
> Foo Bar

I do not know why you expect this behavior. The "r" command replaces
the selected characters by another character. In you example the first
character typed is "C-r" so the result should be something like

^R Bar
^R Bar
^R Bar
^R Bar
^R Bar
^R Bar

and this is indeed the result in both, evil and Vim (at least in my Vim).

Frank



More information about the implementations-list mailing list