Highlighting an Entire Line



  • I use BareTailPro quite a lot because I can highlight entire lines containing certain keywords and it makes it easier to navigate through a complicated log.

    Notepad++ will allow me to highlight only those keywords if I define my own language. I would really like to be able to edit logs within Notepad++ but maintain this highlighting.

    Is anyone aware of a plugin that will allow an entire line to be highlighted and not just the keyword?



  • @Paul-Spark ,

    I don’t know of a plugin that does that, per se.

    However, there might be something that will help.

    If you use Search > Mark instead of Search > Find (or go to the Mark tab from the normal Find dialog), using Mark All will mark the individual words:
    a388a021-e8ed-48d2-9635-70a76f701967-image.png

    But if you enable the ☑ Bookmark Line option, then it will put a “bookmark” on the line, as well:
    b08f1eef-99ca-4212-8cd3-b2c476996614-image.png

    Once bookmarked, you can use the Search > Bookmark > submenu (or the keyboard shortcuts shown) to navigate between the bookmarked lines, and perform other actions (like copy all the bookmarked lines or delete everything that is (or is not) bookmarked).



  • @Paul-Spark

    If you truly want the whole line highlighted, you can do a marking operation similar to what Peter shows, but do it in regular expression search mode and use a Find what field of:

    (?-s)^.*?(?=word1|word2|word3).*$

    where word1, etc is your text of interest.

    There are some limitations: won’t save/restore with restarts of N++, new text added to the file after the marking operation won’t automagically get the highlighting…probably some other issues as well.