TIL: Built-in file compare in Visual Studio Code

Note: “TIL” posts are short on purpose. They are meant as a quick way to share something I learned or found. This might be something trivial to some people, but they are new to me. TIL stands for Today I Learned.

Today I was editing a Swagger file with Visual Studio Code. I was looking for an extension to be able to compare two files with each other. They were not in source control, so I was not able to use that…

I found that comparing files is actually built-in into Visual Studio Code!

Just right-click your first file and click “Select for Compare”.
Then, right-click your second file and select “Compare ‘file1’ with ‘file2′”.

 

So, no need for extra extensions, just provided straight out of the box.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s