Change style for all languages
-
I’ve been on a mission of late to dark-theme my computer. Recently, I’ve been learning about the Style Configurator and themes in Notepad++.
Not finding exactly what I wanted among the built-in themes, I set out to make my own. In the Style Configurator UI, I used Enable global background colour to set a dark color for the editor window, which worked fine.
Because the default syntax highlighting is designed for a light background, though, I also had to change the syntax colors to improve visibility. The problem I’m having is that I only know how to do so on a language-by-language basis.
I know that languages vary in the… “elements”?.. that they each support (I apologize for not knowing the proper terminology here). Nonetheless, they tend to have elements in common, too. For example, consider something like COMMENT, which most languages have. By default, it’s dark green. I need to change it to light green to work on my dark background. My question is:
- Is there a way for me to change the style (e.g. color) of the COMMENT (or other) language element globally, or do I need to make the same change per-language?
I see the XML files for themes in %APPDATA%\notepad++\themes, and assume that I could bulk-change the <WordsStyle name=“COMMENT”…> tag for all languages to reflect my desired style. I’m just curious as to whether there’s a way to do this in the UI.
Thank you in advance for your feedback.
-
Yes, if you make a
mmannion-theme-name.xml
in that same themes folder, you could do that bulk-change by the search/replace you suggested, and (after reloading NPP), that theme would then have the same color for all languages.I’ve never made my own theme, but AFAIK, that’s the only way to do a bulk change across all languages for your theme.
It’s up to you whether to start with the default theme (
stylers.xml
) or one of the pre-existing themes as the basis/template for your theme – it’s just a matter of which file you copy to your custom theme name. (Note, however, that not all existing themes might define things properly for all languages.)Good luck.
-
I think I would like a darker theme myself (or, diehard that I am, one that matches the “classic Borland IDE theme” for those that remember that). However, every time I’ve been inclined to try a darker one, I’ve quickly hit problems similar to what @mmannion is talking about and I’ve backed off, going back to the “bright white” default. I don’t think I have the ambition to go the route he’s going down… :-(