Background color, notepad++ for highlighting purposes

十年热恋 提交于 2019-12-06 23:49:19

问题


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.


回答1:


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.




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/16176908/background-color-notepad-for-highlighting-purposes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!