How to highlight all occurrences of different, but repeated words throughout the open file?



  • If I select a word in notepad++, all occurences of the same word are highlighted in the same open file. I am using this since years.

    Recently I have seen a screenshot of notepad++, where many different words were highlighted at the same time, with different colors. That is, i.e., all occurences of “ABC” highlighted in blue, all occurences of “123” highlighted in yellow, etc…

    I have not found a setting in notepad++, nor a plugin which could do that.

    How can this be done? This would be very handy in analyzing logfiles…

    Thanks
    Dan



  • @Daniel_______

    Are we supposed to fill in your blank? :-)

    You are taking about the Mark All feature. See Search (menu) -> Mark All. Below that there are 5 entries for 5 numbered "style"s. Each style is a different color.

    So, select some text and then try Search (menu) -> Mark All -> Using 3rd Style for example.

    Note also the nearby menu items:

    • Unmark All
    • Jump Up
    • Jump Down

    Fairly self-explanatory? Maybe all except for Jump – read that as “Jump up (or down) to closest text styled with this style number”.

    The Find Style that appears in the two Jump submenus means the redmarking that appears when you use the Find (ctrl+f) feature’s Mark subfeature. (Bad choice of names as the Mark feature has nothing to do with the Mark All feature–except this slight menu overlap!)

    Best advice I can give: Experiment a bit to get the feel of it.



  • Hi @Scott,

    Got it, thanks to your explanation. Very appreciated.

    Now I like notepad even more :-)

    Dan



  • @Daniel_______

    I probably should have mentioned what has disappointed people in the past: The styling you do with this won’t be remembered by Notepad++ if you exit and restart it. It doesn’t bother me all that much; perhaps that’s why I didn’t think to mention it in my first reply.


Log in to reply