Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

which notepad++ syntax highlighting style is applying these colors?

Screenshot: notepad++ syntax highlighting screenshot

Using notepad++ v6.3.2 and editing an html file, Notepad++ is using strange colors to highlight the code. Problem is, i can't find those color values in any section of the theme (Global Styles or HTML or C#). The mysterious green color code is: #707312 and it's not in my modified twightlight.xml. Also, i don't use "transparency" anywhere either, so it's not a variation of some other color.

I use a custom Twilight.xml theme which is located here:
C:\Program Files\Notepad++\themes\twighlight.xml

I'd be happy to share that file, but i don't know how to do that. Can someone please tell me what Notepad++ "style" is highlighting that code selection?

thanks.

like image 244
carrabino Avatar asked May 08 '13 02:05

carrabino


2 Answers

After weeks of fighting this issue, i found the answer. To anyone using Notepad++ and are struggling with seeing weird syntax highlighting when editing HTML or XML files, see here:

https://sourceforge.net/p/notepad-plus/discussion/331753/thread/696b4764/

  1. There may be duplicate values in the theme xml file. You have to remove the duplicates. Specifically, "Find Mark Style" is the culprit.

  2. Open your theme, go to "Global Styles" and remove any dupes (C:\Program Files\Notepad++\themes"yourtheme".xml) Note: 2021 ... this file may be called stylers.model.xml

  3. Update the color that controls this background highlighting.

  4. Uncheck "Highlight Tag Attributes" found here: Settings -> Preferences -> Highlight Matching Tags -> [ ] Highlight Tag Attributes

  5. select your new tag highlighting color:

  6. Settings -> Style Configurator -> Global Styles -> Tags Match Highlighting (set background to the color you wish)

3b. Alternatively, if you don't see "Tags Match Highlighting", it may be "MISC" (thanks to GPPK below)

This should prevent the weird yellow background from showing up when you edit files that have tags (e.g. HTML, XML, etc.)

like image 184
carrabino Avatar answered Sep 22 '22 13:09

carrabino


An additional information to change strange color at HTML/XML attribute,

  • Settings -> Style Configurator -> Global Styles -> Tags attribute (see background color)
like image 21
user4698917 Avatar answered Sep 20 '22 13:09

user4698917