> -Original Message-
> From: Peng Yu [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 10, 2007 10:38 PM
> To: vim@vim.org
> Subject: How to paste without replace the content in buffer
>
> Hi,
>
> Suppose I want to replace "string1" with
Peng Yu schrieb:
Hi,
Suppose I want to replace "string1" with "string2" in a file from vim.
1. Highlight "string1" (in visual mode) and then type "y".
2. Highlight "string2" (in visual mode) and then type "p".
However, the problem with the above procedure is that "string2",
instead of "string1
Peng Yu wrote:
Hi,
Suppose I want to replace "string1" with "string2" in a file from vim.
1. Highlight "string1" (in visual mode) and then type "y".
2. Highlight "string2" (in visual mode) and then type "p".
However, the problem with the above procedure is that "string2",
instead of "string1",
I think that the best way to do this is just with registers. So what
you would do is:
v"ay
v"ap
what this does is use the a register to yank to/put from.
For more info see :help y and :help p
On 3/10/07, Peng Yu <[EMAIL PROTECTED]> wrote:
Hi,
Suppose I want to replace "string1" with "string2
Hi,
Suppose I want to replace "string1" with "string2" in a file from vim.
1. Highlight "string1" (in visual mode) and then type "y".
2. Highlight "string2" (in visual mode) and then type "p".
However, the problem with the above procedure is that "string2",
instead of "string1", is in buffer. T