Notepad++ Compare plugin settings, including color themes for added, deleted, and modified lines, are saved automatically. The plugin writes these preferences to the standard config.xml file located in your user profile AppData directory. You do not need to manually edit configuration files or look for a dedicated Compare.ini file.
Understanding Automatic Configuration Storage
Many users assume that plugins require manual intervention to preserve customizations. This is not the case for the Compare plugin. When you adjust the visual appearance of the comparison view, Notepad++ immediately persists those changes to its global configuration structure. The system relies on the XML-based configuration format used by the entire editor suite. This ensures that your preferences travel with your installation if you export your settings, or remain consistent across different sessions without extra steps. The specific settings managed include the background colors for text additions, deletions, and modifications. It also handles the visibility of the diff markers in the margin. Because this data is stored within the main application config, it is robust against accidental deletion of isolated plugin folders. If you ever reinstall Notepad++, simply restoring yourconfig.xml will restore your compare view aesthetics.
Accessing and Modifying Color Settings
To change how differences appear, navigate to the menu bar and select Plugins, then Compare, and finally Settings. This opens a dialog box where you can customize the visual feedback. Here you will find options to toggle the display of added, deleted, and modified lines. You can also assign specific colors to each category. For example, you might prefer green backgrounds for new code and red for removed sections. Once you have selected your preferred colors, click OK. The changes take effect immediately in any open comparison window. There is no separate "Save" button because the action commits the changes directly to the underlying configuration file. This immediate feedback loop allows you to experiment with high-contrast themes until you find one that reduces eye strain during long review sessions. For more advanced text manipulation needs while reviewing diffs, you might find How to Remove a Break and Join Two Lines Together in Notepad++ useful for cleaning up the output before saving.Locating the Configuration File Manually
Although manual editing is rarely necessary, knowing where the settings live can help with troubleshooting or backup purposes. The configuration file is typically located at:%APPDATA%\Notepad++\config.xml
You can access this path by pressing Win + R, pasting the path above, and hitting Enter. Inside config.xml, look for the <PluginConfig> section. Within this block, there is often a sub-section for the Compare plugin. It contains XML tags defining the RGB values for added, deleted, and modified text. If your colors suddenly revert to default, checking this file can confirm whether the values are being written correctly.
If you suspect corruption in the main config file, you can close Notepad++ and rename config.xml to config.xml.bak. Restarting the editor will generate a fresh configuration file with default settings. You can then reapply your desired compare colors, which will write a new, clean entry into the file.
Exporting Settings for Migration
If you are moving to a new computer or want to share your theme with a team, you should use the built-in export feature. Go to Settings > Import... > Export... in the main menu. Select the items related to plugins and styles. This creates a portable archive that includes your Compare plugin color choices. Importing this file on another machine restores the exact same visual experience without needing to configure each color individually.Troubleshooting Display Issues
Sometimes the comparison view may appear incorrect even after changing settings. First, ensure that both files being compared are using the same encoding. Mismatched encodings can cause the diff engine to highlight entire blocks as changed rather than specific lines. Second, verify that the line endings match. If one file uses CRLF and the other LF, the plugin may struggle to align lines properly, leading to confusing color patterns. Another common issue is the margin width. If the colored bars in the left margin are too narrow to see clearly, you can adjust the zoom level of the editor. While this does not change the stored setting, it improves readability. If the colors still do not update, try restarting Notepad++ completely. Occasionally, the UI thread may cache old style information until a full restart forces a reload fromconfig.xml.
For users who frequently need to manipulate text boundaries during comparisons, learning How to Copy Up to a Particular Character (Including That Character) in Every Line Using Notepad++ can streamline the process of extracting relevant snippets from the diff results.
Ensuring Consistency Across Projects
Since settings are global, they apply to all comparison operations regardless of the project folder. This means you do not need to reset your theme every time you open a new file pair. However, be aware that if you switch between multiple monitors with different DPI scaling, the perceived contrast might vary. In such cases, adjusting the base font size in Notepad++ general settings can indirectly affect how the diff markers appear. If you notice that your settings are not persisting after a crash, check your Windows permissions on the%APPDATA%\Notepad++ folder. Ensure that your user account has write access to config.xml. Without write permission, the plugin cannot save the updated color values, causing them to revert to defaults upon the next launch. Regular backups of this folder prevent loss of these customized preferences.
Frequently Asked Questions
Where exactly is the Compare plugin configuration stored?
The settings are stored inside the global config.xml file located in your user's AppData Roaming folder under Notepad++. There is no separate INI file for this plugin.
Can I reset the Compare plugin colors to default?
Yes, you can either delete the specific XML entries for the Compare plugin in config.xml or rename the entire config file to force Notepad++ to regenerate it with factory defaults.
Why do my diff colors disappear after restarting?
This usually indicates a permission issue where Notepad++ cannot write to config.xml, or the file is corrupted. Running the editor as an administrator temporarily can test if permissions are the root cause.
Does the Compare plugin support syntax highlighting for diffs?
No, the Compare plugin applies solid background colors based on line status (added, deleted, modified). It does not parse the syntax of the code for individual keyword coloring within the diff view.
How do I back up my Compare settings before reinstalling?
You should back up the entire config.xml file or use the Notepad++ Export feature to create a portable settings archive that includes plugin configurations.