比较Sublime Text中两个文件的内容 [英] Comparing the contents of two files in Sublime Text
问题描述
我有两个非常相似的开源项目的两个克隆的存储库,我已经在Sublime Text 2中的不同实例中工作,以达到我想要的结果。使用了来自这两个项目的代码。我一直使用Git作为我的项目的版本控制,但没有包括原始项目。因此,我想能够快速比较原始项目的两个文件的内容,并比较它们和我的项目之间的差异。
I have two cloned repositories of two very similar open-source projects, which I have been working on in different instances in Sublime Text 2 to arrive at my desired result. Code from both of these projects was used. I have been using Git as version control for my project, but have not included the original projects. Thus, I would like to be able to quickly compare the contents of two files of the original project and compare the differences between them and my project.
我希望Sublime文本2将有一个比较文件功能,但我似乎找不到任何与它相关的设置或在线。完成这个任务的第三方ST2包也可以很好地工作。 这样的任务在ST2文本编辑器中可以做吗?
I was hoping that Sublime Text 2 would have a "Compare File" feature, but I can't seem to find anything related to it in the settings or online. A third-party ST2 package to accomplish this task would also work well. Is such a task possible to do within the ST2 text editor?
推荐答案
在Sublime Text中。只需选择两个文件(例如,在Windows上按住 Ctrl 或在OS X上按⌘)即可在边栏中进行比较(确保已导航到包含通过打开文件夹...或在项目中),右键单击并选择差异文件... 。
You can actually compare files natively right in Sublime Text. Simply select the two files (ie, by holding Ctrl on Windows or ⌘ on OS X) you want to compare in the sidebar (make sure you have navigated to the folder containing them, through "Open Folder..." or in a project), right click and select Diff files....
这篇关于比较Sublime Text中两个文件的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!