6

I know that I can double click a word and Notepad++ will highlight all instances of that word within the document. My question is not about this.

Does anyone know of a plug-in or setting which will allow me to select as many characters as I please and highlight all occurrences of those characters?

Given the following text file:

$hey_you = 'hey you';
$hey_me = 'hey me';
$hey_we = 'hey we';

With my cursor I wish to select $hey_ and have the 3 $hey_s highlighted.


Also, if the scroll-bar could behave like Google Chrome's with yellow markings then that would be a huge bonus, too.

enter image description here

11
+500

Try the Settings -> Preferences -> Highlighting and uncheck the "Match whole word only" under Smart Highlighting.

that seemed to work for me.

| improve this answer | |
  • This sounds incredibly promising but I cannot test it out until tomorrow but if it works then I will gladly accept this answer! – MonkeyZeus Mar 21 '19 at 1:48
  • Superb, thank you so much for the answer!! – MonkeyZeus Mar 21 '19 at 12:34
  • This setting has honestly made Notepad++ so much nicer for me and it will be so much harder to ever give it up for any other editor. I sincerely appreciate this answer and wish I could upvote several times. – MonkeyZeus Mar 21 '19 at 18:18
5

With my cursor I wish to select $hey_ and have the 3 $hey_s highlighted

Select the text $hey_ and then Menu > Search > Mark All > Choose a highlight style:

enter image description here

| improve this answer | |
  • Hi, just wanted to let you know that I have accepted a different answer to my question. Your answer works properly for my issue but the other answer wins due to ease-of-use. Thanks! – MonkeyZeus Mar 21 '19 at 12:36
0

Accepted answer and other are good but I needed to adjust few style to highlight it properly so that it can standout as my default Global override has foreground and background white and black respectively

Settings -> style Configurator -> Global Styles

Then change foreground color and background for below Style as needed:

Selected text color Smart HighLighting Mark Style 1 to 5

| improve this answer | |

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.