I'm trying to define my own user defined language in notepad++. Reason: I want to introduce coloring schemes for different logfile entries. Does anbody know if there is a way to highlight the complete line containing a specific keyword?
You could use comment line if the special keyword is at the beginning
If what you want is to know the lines with some errors, you better use the Mark tab of the search window with the check of Bookmark line
.
[Edited 28 June 2016]
If you want a more powerful solution that fits your need exactly, you can try with the plugin Python Scripts.
Once the plugin installed, you can write a python script.
highlight_preprocessor
that does the following:
Editor.markerDeleteAll(<ID_keyword>)
where <ID_keyword>
is a digit associated to the keyword (e.g. 10 for error, 11 for warning, etc.)<ID_keyword>
, set the colors of the highlight (e.g. dark gray) by calling the function editor.markerSetBack(<ID_keyword>, (<R>, <G>, <B>) )
(where the last 3 numbers are the RGB values of the color - 20/20/20 for dark grey)editor.markerAdd(<line_number>, <ID_keyword>)
notepad.callback(highlight_preprocessor, [NOTIFICATION.FILEBEFORESAVE])
Takes some time and effort to make it work but at least it is possible.