Notepad++: Rule based line highlighting

Is there a way to automatically highlight lines based on predefined rules in Notepad++?

I'm not talking about syntax highlighting, but rather about log files readability.

I'm looking either for a feature I've missed, or a plugin.


Solution 1:

  1. Select Language > Define your language... (or View Language > User-Defined Dialog..., or Language > User-Defined, depending on version and localisation file)
  2. Use the User-Defined dialogue to specify what to highlight. To highlight certain words, use the Keyword Lists tab and enter each word in a Group, selecting Colour/Font style as you like. You can also use Comment Line on the Comment & Number tab to highlight from a word to the end of the line (check Treat keyword as symbol for partial word match).
  3. Select Language > User-Defined

If you want to use this highlighting scheme regularly, you can save it by clicking Save As.... This scheme should now be listed under the Language menu of the main Notepad++ window.

Solution 2:

I have the same need. "Highlighting lines that contain specific keywords". I currently use Baretail or better: Glogg for this, but it would be nice to see this in Notepad++.

I generally use Notepad++ to browse through log files. Certain events start with specific keywords; line highlighting in Notepad++ would allow me to quickly find the events in the log.

Solution 3:

As stated before me:

Select Language > Define your language... (or View Language > User-Defined Dialog..., or Language > User-Defined, depending on version and localisation file)

In my case. I needed to color code lines starting with "V"{tab} I set Delimiter 1 style:

  • Open: V
  • Escape:
  • Close:((EOL))

This would highlight also mid text V and on, so I copied a {tab} into

Open: V{tab} //{tab} is not visible but present

I found out that {tab} is in exported .xml encoded as 	 which stands for http://www.unicodemap.org/details/0x0009/index.html exactly what I needed. So by modifing the xml with unicode caracter codes