User Defined Language coloring whole line
-
I defined User-defined language for notepad++ , that colors ‘Error’ in red while colors ‘Note’ in blue .
Can I make it colors the whole line that contains the word ‘Error’ ?
For example I have this line :
“Error : initialized Failed!”
I now get it with red ‘Error’ whereas the rest of the line in the default color ,
can I get the whole line in red color ? All the lines that contains the wrod Error regardless the position of the word ‘Error’ ?Thanks,
Raghad -
You could define Error as the prefix for single-line comments, which would allow the whole line to be colored.
But that wouldn’t help if you really wanted “Error.$" in red and "Note.$” in blue.
Some months back, @Claudia-Frank made some posts on a PythonScript-based lexer, as an alternative to the builtin UDL lexer, which allows defining styles based on regular expressions. I’ve never tried to use them, but in September, at the end of this other thread, I compiled a list of links to her posts about it. I’ve never tried implementing a regex-UDL using her solution, but it may be worth trying out – I’d recommend giving it a try.
-
The current pythonscript plugin has even an example which looks like is what you are looking for.
Eko
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