Background color, notepad++ for highlighting purposes
Asked Answered
P

3

11

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.

Passport answered 23/4, 2013 at 18:46 Comment(1)
Notepad++ would have to store these color information in some meta data specific for your file, I don't think it is possible as it is still a text editor.Inception
L
17

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.

Lung answered 23/4, 2013 at 22:41 Comment(0)
A
5

In Notepad++

First select the line/words to be highlighted

Go to 'Search' Menu

Select 'Mark All'. There you will find 5 sub-menu as 'using [1..5]th style'.

(using 1st style : cyan colour) . (2nd : light brown) . (3rd : yellow) . (4th : purple) . (5th : green) .

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.

Adcock answered 11/2, 2014 at 5:47 Comment(1)
I did not see a "style token" menu after right clicking, but this works.Psychobiology
S
1

You can also define a language that set the snippet as a keyword and choose style for it.

Swann answered 17/7, 2013 at 7:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.