Comparing the contents of two files in Sublime Text

前端 未结 10 1941
被撕碎了的回忆
被撕碎了的回忆 2021-01-29 17:27

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. Co

相关标签:
10条回答
  • 2021-01-29 17:54

    You can actually compare files natively right in Sublime Text.

    1. Navigate to the folder containing them through Open Folder... or in a project
    2. Select the two files (ie, by holding Ctrl on Windows or on macOS) you want to compare in the sidebar
    3. Right click and select the Diff files... option.

    0 讨论(0)
  • 2021-01-29 17:54

    No one is talking about Linux but all above answers will work. Just use Ctrl to select more than one file. If you are looking to compare side by side, Meld is lovely.

    0 讨论(0)
  • 2021-01-29 18:00

    There's a BeyondCompare plugin as well. It opens the 2 files in a BeyondCompare window. Pretty convenient to open files from the sublime window.

    You will need BC3 installation present in the system. After installing the plugin, you will have to provide the path to the installation.

    Example:

    {
        //Define a custom path to beyond compare
        "beyond_compare_path": "G:/Softwares/Beyond Compare 3/BCompare.exe"
    }
    
    0 讨论(0)
  • 2021-01-29 18:01

    The Diff Option only appears if the files are in a folder that is part of a Project.

    Than 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.

    0 讨论(0)
提交回复
热议问题