What are Themes
Editing and Creating Themes
The easiest way to edit an existing theme is to use the Style Configurator to edit the various styles.
But you can also edit the underlying XML file: stylers.xml (the default theme) is in the main configuration directory; all the other themes have their own file in the Themes\ subdirectory. Config Files > Highlighting schemes: stylers.xml has the details on the XML format for themes, to help with manually editing it.
The easiest way to create a new theme is to copy an existing theme file to a new name in the %AppData%\Notepad++\Themes\ directory (or equivalent), reload Notepad++, and then use the Style Configurator to edit the color and font settings (or edit the XML file directly, and reload). For the “existing theme file” to copy from: for creating “light” theme, the best idea (to make sure it’s as up-to-date as possible, to list all the current syntax highlighting languages and styles) is to copy stylers.model.xml from your installation directory and put the renamed copy in your %AppData%\Notepad++\Themes\ directory; for creating a “dark” theme, start from a copy of Themes\DarkModeDefault.xml.
(You have to exit Notepad++ and rerun the application to see a new theme that you’ve copied into your Themes directory, or to see any updates you’ve made by manually editing the XML file(s).)
Theme and styler XML files need to be encoded as UTF-8 with no BOM (see Config File Encoding).
Sharing Themes
You may share a theme (or you may install a theme someone shared with you) in a similar method to creating a new theme: copy the theme file to an appropriate name (or download it), and put it in your Themes\ subdirectory (see next paragraph for more on location): it’s the same whether you are sharing across multiple users on the same computer, sharing across local computers, or sharing over the internet. Once the file is in your Themes directory, you need to restart Notepad++ to allow it to see that the Theme is available in the Style Configurator.
It is easy to just save the theme file in %AppData%\Notepad++\Themes\ directory for a normal installation (or in your Cloud or -settingsDir, depending on your current Config Files Location). Using Settings > Import > Import Style Themes… will allow you to select your downloaded theme file and attempt to put it in <installationDir>\themes\ (because that location might be in your Program Files or similarly-protected directory, you might need to be running Notepad++ “as Admin” for it to work). Notepad++ checks both directories, when it starts, to build the list of Themes in the Style Configurator.
Aside from the Themes that ship with Notepad++ when you install it, there is also an official Notepad++ Themes Collection on GitHub, where you can make your Theme publicly available, or grab a Theme that others have shared.
Keeping Stylers/Themes Up-To-Date
Starting in v8.8.9, Notepad++ will propagate new Languages and new styles inside existing languages from the model file into your active Theme file. In v8.8.9, it will always use the color from the model file (so the default light-mode theme color) for added styles; in v8.9 and beyond, it will use the light-mode color from the model file if your active theme is stylers.xml, otherwise it will use the default foreground and background colors from your active theme. (If v8.8.9 updated your dark theme already, and you find the results too jarring, the Community Forum has a FAQ explaining how to fix it. That FAQ is not needed if you never ran v8.8.9, or if you were just using stylers.xml and not one of the Themes.)
Before Notepad++ v8.8.9
When you install/update Notepad++, the installer will populate <installation_dir>\Themes\*.xml with the most recent copies of the standard Themes, and will overwrite the <installation_dir>\stylers.model.xml to make sure that the source of the default theme contains all the appropriate syntax-highlighting languages and all the most-recent general interface styles in Style Configurator’s Global Styles.
However, except for a new installation (where you don’t already have %AppData%\Notepad++\stylers.xml), your copy of the the default theme and any themes you have in the %AppData%\Notepad++\Themes will not be updated or overwritten (because the Developer doesn’t want you to lose any customizations). If you use the default theme, and have not customized any styles in the Style Configurator, then the easiest way to update the default theme is to exit Notepad++, delete %AppData%\Notepad++\stylers.xml, and restart Notepad++, which will recreate your stylers.xml from the most-recent stylers.model.xml; however, if you had any Style Configurator customizations (including colors, fonts, or per-language user-defined extensions or user-defined keywords), they will be lost if you delete stylers.xml.
When a new version of Notepad++ is released, the Developer ensures stylers.model.xml and Themes\DarkModeDefault.xml are up-to-date, but the Developer relies on volunteers to submit PR to update the other themes, so many of them can be missing languages or specific styles. So if you want to update a Theme that’s missing languages or specific styles, or if you want to edit stylers.xml without losing any of your customizations, then you will want to open up your stylers.xml or other theme’s XML simultaneously with stylers.model.xml; you can then go section-by-section and line-by-line (the ComparePlus plugin could be helpful for this), and copy over any of the <LexerType...> sections that don’t exist in yours (note they may be in a different order), or any <WordsStyle...> missing from a <LexerType...> or any <WidgetStyle...> that is missing from your <GlobalStyles> section. This can be a tedious process, so if you’re willing to install the PythonScript plugin, you can find a script in the Notepad++ Community Forum’s “Config Files Need Updating, Too” post (or, alternatively, a standalone plugin that does it), which will automate the process of keeping your themes (and default language keywords) up-to-date. But this script or ConfigUpdater plugin are not needed once you upgrade to Notepad++ v8.9.
Resetting Stylers/Themes
Users occasionally want to reset their stylers.xml or selected theme back to the default out-of-the-box condition. The exact instructions depend on whether you are using stylers.xml or one of the other themes, and whether you are using a portable copy of Notepad++ or not (which affects your configuration files location).
- If you are using the Default (
stylers.xml) theme: - Exit all instances of Notepad++.
- Delete
%AppData%\Notepad++\stylers.xmlfor a normal installation (or your cloud directory or-settingsDiror portable folder copy ofstylers.xml). - Restart Notepad++: it will regenerate
stylers.xmlin the right place, based on thestylers.model.xmlfound in your Notepad++ executable’s directory. - If you are using one of the other themes, and not using a portable copy of Notepad++:
- Exit all instances of Notepad++.
- Go to
%AppData%\Notepad++\themes\, or thethemes\subdirectory of the appropriate configuration files location, and delete the customized theme file(s) you wish to reset. - Restart Notepad++: it will use the copy of the theme from the installation/executable directory, which will normally be the unedited version.
- If you have manually edited your installation-directory’s theme files (whether with a normal installation, or one of the other configuration files locations), which is not recommended, you will have to follow a similar procedure to the portable instructions, copying the themes from a portable zipfile, and putting them in your installation directory’s
themes\subdirectory before you restart Notepad++. - If you are using one of the other themes, and you are using a portable copy of Notepad++:
- Exit all instances of Notepad++.
- Go to the portable directory, in the
themes\subdirectory, and delete the customized theme file(s) you wish to reset. - Grab your portable zipfile (
.zipor.7z) for your current version of Notepad++, and extract the original theme file(s) back into your portable directory’sthemes\subdirectory.- If you no longer have your zipfile, you can go to the official downloads site to grab a fresh copy of the same version’s zipfile.
- Restart Notepad++, and your theme will be back to the original.
