Compare code or Files using Notepad++ Plugin
In this post, we shall showcase how to use a plugin called “Compare”, which we can install in Notepad++ and compare the code or any text. If you are working for an organization then it is always preferable to avoid online code comparison sites to avoid security issues. In that case, you can get this plugin installed on your laptop or PC.
Below are the steps to use this plugin –
- Install Notepad++ in your PC / laptop
- Download the plugin file “ComparePlugin.dll” from the web as shown in the image below
- Go to (1) “Settings” option in Menu, then (2) “Import”, then click on (3) “Import Plugins” as shown in the image below.
- When you click on the “Import Plugin” option, a dialog box will open up. Select the plugin file which you have downloaded.
- Now the imported plugin will be shown in the “Plugin” option in the Menu, as shown below.
How to compare 2 codes in Notepad++ ?
Here I am just comparing a very small code so that you can identify the difference easily. So below are the steps you need to compare the code –
- Open Notepad++
- Open a new file by pressing “Control + N “, paste your first code in this file or tab
- Again open a new file by pressing “Control + N”, paste your second code in this file or tab
- Now your two files will look like as shown below.
- Click on the “Plugin” button in Menu, and then click on the “Compare” button, then again click on the “Compare” option as shown below.
- After this, all difference between 2 codes will be highlighted as shown in the image below.
In the image above you can see the green boxes on the left and right side. You can also see the difference. For example in the 3rd line, I have used “Quantity_new” on the left side, while on the right side I have used “Quantity”.
Post you may like