Vim粘贴行为

rad*_*man 2 vim paste

对于Vim来说,我是一个初学者,它目前在很多方面让我感到恼火.其中之一是:

假设我在文件中有以下文本

one  
two  
three  
four  

dog  
frog  
log  
mog  
Run Code Online (Sandbox Code Playgroud)

并且我使用视觉模式选择数字(4行)如果我然后使用P粘贴在狗的'd'我得到以下内容:

one
two
three
four


one  dog
two  frog
threelog
four mog
Run Code Online (Sandbox Code Playgroud)

我想要的输出是:

one
two
three
four


one
two
three
four
dog  
frog 
log
mog
Run Code Online (Sandbox Code Playgroud)

我注意到它表现得像我期望的那样,如果我做y4y而不是直观地选择线条.那么是什么导致了我所看到的行为上的差异?如何根据需要将我的视觉选择块粘贴?

CMS*_*CMS 7

似乎您正在进入可视块选择模式(Ctrl- V).

要获得所需的输出,只需按下即可进入线性选择模式V.