Using the Visual Studio diff editor efficiently

北城余情 提交于 2019-12-08 06:58:38

问题


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.

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?


回答1:


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.



来源:https://stackoverflow.com/questions/39179135/using-the-visual-studio-diff-editor-efficiently

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!