在 Sublime Text 中比较两个文件的内容 [英] Comparing the contents of two files in Sublime Text
问题描述
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.
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?
You can actually compare files natively right in Sublime Text.
- Navigate to the folder containing them through
Open Folder...
or in a project - Select the two files (ie, by holding Ctrl on Windows or ⌘ on macOS) you want to compare in the sidebar
- Right click and select the
Diff files...
option.
这篇关于在 Sublime Text 中比较两个文件的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!