Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 vimdiff 来查看两个文件之间的区别。我想知道是否可以从左侧选项卡(第一个文件)复制一行并将其粘贴到第二个选项卡(第二个文件)中。实际上,我什至似乎无法访问第二个选项卡。
谢谢!
如评论中所述,您可以使用dp或do在缓冲区之间移动光标所在的差异。
dp
do
您还可以使用命令:[range]diffget和:[range]diffput,这意味着如果您已经查看了整个文件中的所有差异,您可以分别从当前缓冲区:1,$diffput或将所有差异移动或移动到当前缓冲区。:1,$diffget
:[range]diffget
:[range]diffput
:1,$diffput
:1,$diffget