How to Compare files in Visual Studio Code ?

By | June 4, 2015

Visual Studio Code, supports File Compare of Working Files and let you compare the changes in different modes.  You can leverage this feature either from File Explorer Side Bar  or by using “Files:Compare Opened File With” command. VS Code Compare tool works in a very similar way like other compare tool and you can change the setting to view the changes in “In Line Mode” or “Merged Mode” within the code compare window.

Consider you made some changes in local settings file which is specific to the current folder / project and wants to compare with global settings.  When you have both the files in “Working Files” sections, Select any of the file, and choose “Select for Compare” from the context menu.


Select the other file to which you want to compare. Now in the context menu, “Compare with <Previously Selected File for Compare>” would appear . ( In this case “settings.json”)


Select “Compare with ‘settings.json’” options, you should be able to view a side by side compare window with color highlighting on the changes as shown in image below.


Compare windows will appear in a side by side view by default. You can change it to “Inline View” by selecting “Switch to Inline View” options.

Visual Studio Code Tip : How to navigate through history of files in Visual Studio Code ?


Following image shows how an inline compare view looks.


If there are multiple changes, you can use the “Preview” and “Next” change arrow to navigate through the changes.

Related Read : A Quick Lap Around Visual Studio Code

3 thoughts on “How to Compare files in Visual Studio Code ?

  1. Pingback: Ideal Windows 10 App Development Environment

  2. Pingback: Dew Drop – June 5, 2015 (#2029) | Morning Dew

  3. Pingback: .NET Tips and Tricks from Daily .NET Tips – June 2015 Links | Abhijit's World of .NET

Comments are closed.