Code Folding Plain Text in Dark Mode
-
I have a couple important text files that I’ve wanted to get Code Folding working for. I thus created a new User Defined language for “.text” and only put {{ in the Open “Folding in code 1 style” box and I put }} in the Close “Folding in code 1 style” box.
At this point, if Notepad++ is NOT in Dark Mode, I can fold and unfold my text just fine and it looks fine. But when I enable Dark Mode (either by changing to a different Template in the SETTINGS -> STYLE CONFIGURATOR boxl or if I set Dark Mode in the SETTINGS -> PREFERENCES) the code folding works fine, but either way, any text has dark text on a white background, and all the other “empty” spaces and lines are the dark color.
Anyone know why this is? And… is there a way to fix it?
As side questions, how can you delete a User Defined Language, or … how can you edit a User Defined Language?
-
UDLs are mostly independent of themes – you define their colors separately from the theme colors. By using “transparent” background instead of fixed background (right click on the color square, or click the “Transparent” checkbox if you’re in a new enough version of Notepad++), you can alleviate some of the problems of it not matching well with the rest of your theme, because it will just inherit the background from your theme. But a foreground color that works well on a light background will not usually work well on a dark background. This is the reason that even the Markdown UDL that distributes with Notepad++ has two versions – one if you’re in Dark mode, and one for default light mode.
how can you edit a User Defined Language
- Language > User Defined Language > Define My Language, then select your UDL from the User Language dropdown. Then edit the keywords,operators,styles, etc just as you did when you created.
how can you delete a User Defined Language
Language > User Defined Language > Define My Language, then select your UDL from the User Language dropdown. Then Remove