有效地使用Visual Studio差异编辑器 [英] Using the Visual Studio diff editor efficiently

查看:146
本文介绍了有效地使用Visual Studio差异编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2015,并且有一个使用Git在本地版本化的项目。当我在Team Explorer窗口中双击一个文件时,将打开一个Diff编辑器。

I am using Visual Studio 2015 and have a project that is versioned locally using Git. When I double-click on a file in the Team Explorer window, a Diff editor opens.

在其他IDE(Eclipse,IntelliJ)中,我习惯于管理更改在这些差异编辑器中,例如从左向右或以相反的方式复制块。没有中间的指示条表明可能采取的行动,也没有其他线索。

From other IDEs (Eclipse, IntelliJ), I am used to managing my changes in these diff editors, like copying a chunk from the left to the right or the other way round. There is no middle bar that indicates such possible actions and no other clue.

因此,当我想还原一段代码时,必须在左侧选择它,将其复制到剪贴板,在右侧选择相应的文本,从剪贴板粘贴文本。这感觉很笨拙,因为我要做的就是还原这一块。

So when I want to revert a chunk of code, I have to select it on the left side, copy it to the clipboard, select the corresponding text on the right side, paste the text from the clipboard. This feels very clumsy, since all I want to do is to "revert this one chunk".

有什么我忽略的东西吗?

Is there something I have overlooked?

推荐答案

Visual Studio中的内部差异/合并工具非常原始且难以使用。幸运的是,它支持外部差异工具(由于注释而导致的代码审查除外)。因此,请帮自己一个忙,安装 KDiff3 配置作为要使用的工具。对于2015版,仅将其指向kdiff3.exe文件就足够了,它将自动填写适当的参数配置。

The internal diff/merge tool in Visual Studio is extremely primitive and dreadful to work with. Luckily it supports external diff tools (except for code reviews due to commenting). So do yourself a favour and install KDiff3 and configure it as the tool to use. For version 2015 it is enough to just point it to the kdiff3.exe file, it will then automatically fill out the appropriate argument configuration.

这篇关于有效地使用Visual Studio差异编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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