문제

Here is my problem:

I am in visual mode.

I select text and copy it to the buffer. ((y)ank)

I select another text which I want to replace and paste the buffer. ((p)aste)

Now the second selection has been replaced in the buffer, however I want the first one to still sit in there.

Any ideas?

도움이 되었습니까?

해결책

Often, this behavior is useful. When you don't want it, you can instead do the usual yank, then paste (officially, 'put') with "0p. You can do this however many times you like.

See :help v_p for more.

If you want to avoid the overwrite, you need to delete first. You can use "_ to select the blackhole buffer, then delete d, then paste before P and you'll avoid the buffer being set.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top