On Sep 17, 6:06 am, [email protected] wrote:
> I move the cursor over the first ')', press CTRL-V
> and move the cursor down over the last ')'. I press
> "I" (insert) then "p" (paste) and finally Escape.
>
> Now I have:
>
> A(123)=1
> B()=1
> C()=1
> D()=1
> E()=1
> F()=1
>
Are you sure? I get:
A(p)=1
B(p)=1
C(p)=1
D(p)=1
E(p)=1
F(p)=1
When you press I (insert) you're IN INSERT MODE so it just inserts the
'p' character instead of pasting.
If instead (as I suspect), you pressed I<Esc>p, then your problem is
that you LEFT insert mode (performing a no-op on all the lines, and
moving the cursor left) and THEN pasted.
The <CTRL-R>" that John suggests never leaves insert mode, so the
change gets applied to every line when you finally do.
Note that you could also use <CTRL-R>0 to always paste the last yanked
text, <CTRL-R>- to paste the last deletion that was less that a full
line, <CTRL-R>a to paste the contents of register a, <CTRL-R>+ to
paste the contents of the system clipboard, or any number of other
special or named registers. Reading throught :help registers will give
you all of them. Some are more useful than others.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---