Is there a way in Notepad++ to highlight a snippet of text and change it's background color? I would like it to remain that color within the editor for highlighting purposes. I don't want the color to change the code at all.
If you want to highlight one word at a time, press Ctrl while holding down Shift , and then press Left arrow or Right arrow . If you want to highlight a whole line of text, move your cursor to the start of the line, hold Shift , and then press Down arrow . You may also use the shortcut key combination Shift + End .
The correct answer is Shading. For the color background of the text in a document, select the text and choose a color as per requirement.
You can get the effect you want by right-clicking on the highlighted snippet and selecting "Style token" -> "Using (n)th style".
This will also highlight any other sections of your code which are identical to the one you selected, which may or may not be what you want. However the highlighting will only remain for as long as you have that file open in notepad++. If you close it, you will lose the highlighting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With