Notepad++ is not merely a text editor. If you are a programmer, you can use it to write your programming code. Notepad++ comes with syntax highlighting and auto-completion, which are the standard features of paid IDEs. But, you don’t need to spend a dime to use Notepad++ since it is a free, open source software. You can also use Notepad++ to compare two files.
Before being able to compare two files in Notepad++, you need to install a plugin first since by default, Notepad++ has no feature to compare files. Comparing two files itself is the best way to find the differences between two files. In the context of programming, you can compare two files to find the differences between the old version and the newer versions of your scripts.
How to compare two files in Notepad++
As mentioned, you need to install the plugin first before being able to compare two files in Notepad++. To install the plugin, launch your Notepadd++ and go to Plugins -> Plugins Admin. This will open the Plugins Admin window.
On the Available tab, search for the Compare plugin on the available search box and check once it found. Click the Install button to install it. Your Notepadd++ will be restarted automatically once the installation is complete.
If you find no Plugins Admin under the Plugins menu, visit this post to fix it.
After installing the Compare plugin, you can start using Notepad++ to compare two files. To get started, open two files (the files you want to compare) in Notepad++ and go to Plugins -> Compare -> Compare (Ctrl+Alt+C). This will show the differences between the two open files, side by side, as shown in the screenshot below.
If you want to compare one of the open files with another file, you can set it as the default first file by going to Plugins -> Compare -> Set as First to Compare (Ctrl+Alt+1). You can then open a new file to compare with it.
By default, Notepad++ compares your file in double-view mode (horizontally). You can switch to the vertical mode by right-clicking the gripper and select Rotate to right or Rotate to left.
The Compare plugin uses the vary of colors and symbols to show you the changes in your file.
- Added (+): The line only exists in the new file and not the old ones
- Remove (-): The line does not exist in the new file and only present in the old file
- Moved: The line appears once in the other file and a different location.
- Changed: Most of the line is identical in both files. You’ll see the changes highlighted in orange.
The Compare plugin also comes with a navigation bar which is pretty handy if you are comparing two large files. The way this navigation bar works is pretty similar to a sitemap and bookmark browser. You can activate the navigator bar by going to Plugins -> Compare -> Navigation Bar.