UDL to change font color of a character at a specific character count
-
I’m looking for a way to change the color of the character that falls at a specific character count on each line. For example, turn the 12th character on ever line red.
-
There’s nothing native to Notepad++ that does that out of the box.
However, Notepad++ has plugins, including scripting languages.
You can add extra highlighting to a builtin lexer (like the HTML lexer) or to a User Defined Language (UDL) using regexes via the script
EnhanceAnyLexer.pythat @Ekopalypse shares in his github repo.The regex would be something like
(?-s)^.{11}\K(.)– I haven’t tried it, but that would be the first regex I would try = it finds first 11 characters.{11}, throws that out with\K, and then captures the single character(.). I believe that would do what you want.
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