使用vimdiff合并更改 [英] Merge changes using vimdiff

查看:145
本文介绍了使用vimdiff合并更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就我而言,我有两个文件file1和file2。使用vimdiff,我想按如下所示合并更改:

In my case, I have two files file1 and file2. Using vimdiff, I want to merge the changes as follows:


  1. 首先,将file1的行放在file2的行之上。这意味着文件2中的清单2 清单2 之类的区别应为清单2 ,然后在合并文件中列出清单2

  2. 反写大小写。

  1. In first difference, place line from file1 above line from file2. It means difference such as Listing 2 in file2 and List 2 should be List 2 followed by Listing 2 in the merged file.
  2. Reverse case in another change.

快照如下所示。

我们如何使用vimdiff实现此目的?

How can we achieve this using vimdiff?

推荐答案

您可以使用 Ctrl w w 在两个窗口之间来回切换。您可以从一个窗口执行 Ctrl w w 复制,然后粘贴到另一个窗口中。解决差异时,高光将改变并消失。

You can switch back and forth between the two windows with Ctrlww. You can copy from one window do a Ctrlww, and then paste into the other. As you resolve differences, the highlights will change, and disappear.

看看这个视频

这篇关于使用vimdiff合并更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆