问题描述
如果我用 + , + 复制3行,然后转到另一个窗口并用粘贴,这些行混合了。
If I copy 3 lines with +, + and then go to another window and paste with , the lines get mixed.
我该如何将被拖拉的块粘贴为新行,所以旧行会移到下面
How can I paste the yanked block as new lines, so the old lines move below instead of get mixed with the pasted ones?
推荐答案
按 Ctrl-V
在正常模式下,您将切换到V块模式,在该模式下,文本将逐段复制(位置相对固定)。
When you press Ctrl-V
in normal mode, you are switched into the V-BLOCK mode where the text will be copied blockwise (with relatively fixed position).
@PeterRincker在评论部分提供了一种非常简单的方法,您可以通过以下方式将带阴影的块 linewise 放入:
@PeterRincker gave a very easy way in the comments section, you can put the yanked block linewise by:
:put
下面是我的原始答案,这需要更多步骤。
Below is my original answer, which takes much more steps.
一种不太整洁但实用的粘贴方式 linewise :
A not very neat yet practical way to paste it linewise:
-
:new
创建新缓冲区 -
p
粘贴 -
Shift + V + G
选择所有文本 -
y
复制
:new
to create a new bufferp
to pasteShift+V+G
to select all texty
to copy
现在您将获得复制文本的普通形式。
And now you get the normal form of the copied text.
这篇关于带`p`的粘贴粘贴块与下面的行混合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!