How to set a global comment style?
-
I’ve searched but could not find anything related to this.
How do I set a default comment (or keyword, or whatever) text style (font, font-style, color, etc.) style for ALL languages at once?
I know how to set for one specific language, but I’d like to be able to set one style for the entire N++ and than go language by language.
Thanks in advance.
-
The reason you could not find it documented anywhere is that there is no easy way to do that. One of the problems is not all the COMMENTs (for example) have the same style ID or same exact name in every language; and not every language has a COMMENT. (It’s one of the reasons that designing a whole style takes effort, rather than just a couple quick tweaks.)
If you wanted to change something like that, you could open up
%AppData%\Notepad++\stylers.xmland do a series of regex-based search-and-replace like- FIND =
(?i-s)(name="COMMENT.*?fgColor)=".{6}"
REPLACE =${1}="XXXXXX"
SEARCH MODE = Regular Expression
(that will replace the foreground for any style name that starts with COMMENT with the color XXXXXX of your choice)
You would then have to do that for every style name that is reasonably consistent throughout all the language style definitions.
- FIND =
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login