46

In Notepad++, when I select (eg. double-click) a "word", it gets highlighted. It needs to be separated with a non-alpha character from the rest of the text. The highlight remains until the text is selected.

Is there a way to make this highlight "permanent", ie. remain when the word is not selected any more?

Nice to have: can partial words be highlighted?

86

Just use the mark feature.

  1. Open the Search & Replace dialog and go to the Mark tab.

  2. Enter your search term and click Mark All.

    enter image description here

  3. All occurrences are now permanently marked:

    enter image description here

To remove the marks, simply open the dialog again and click Clear all marks.

Alternatively, while you have the word selected, you can use the Mark functionality in the Search menu:

enter image description here

This also allows you to mark all occurrences of a given string in the document (and you can even have multiple markers going on simultaneously).

Please note that both approaches work perfectly fine with partial words. In fact, multiple markers can apply to the same partial string. Here I've used a marker for port and one for mporta:

Using multiple markers simultaneously

  • 3
    Warning. This does not permanently highlight the text. After closing and re-opening the file the marks will be gone. – jiggunjer Jun 25 '16 at 10:19
12

Select your text > Right click on the text area > Choose Style Token from context menu > Apply the style you need. Done.

  • 2
    This one is very handy! – n611x007 Mar 3 '14 at 11:17
  • 1
    This is also not permanent. All highlighting will be gone upon re-opening the file. – Makesh Jan 11 '17 at 11:25
  • @Makesh I am not aware of any permanent solution which will work on re-opening the file. – Saikat Sengupta Jan 11 '17 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.