Back a few years ago I added LESS to NPP. I don't remember where or how I added it. I want to change the colors but I can't find where they are defined in the first place. In the C:\Program Files (x86)\Notepad++\ folder I have a color scheme XML that I added, but this was for all NPP languages, and does not include LESS, and there are no other XML files that have it defined that I can see. It is not available in the Settings > Style Configurator Dialog. I can change the colors in the Language > Define your Language... Dialog, but, again, this is not where the colors are defined to start with since they are all "Black on White" in the Dialog where they are showing muted blue/green/black on beige when you read the file.

I can override the colors in the Define your Language... Dialog, but I feel like it is already defined somewhere and I want to edit that file instead.

  • Try looking in the plugins subdirectory – DavidPostill Mar 10 '19 at 8:47
  • To clarify things, you might want to edit your question to include what your theme is (Style Configurator: Select Theme), and add screenshots of what you see in your LESS file for the existing colors. If those contradict my answer below, I will do more research and edit my answer to better suit what you're really seeing. – PeterCJ Mar 10 '19 at 18:32
  • @DavidPostill♦ - All I see in the /plugins/ are files for the installed plugins like spellcheck, FingerText, etc. and XMLs of keywords to languages in the APIs folder. BUT, I did find a DLL in the NppExport that I cant read which reminded me that at one time I tried to export the settings from a previous NPP back like 5 years ago. I dont remember succeeding, but I might have. Do you think this DLL would have a UDL from a previous build? but not accessible through the UDL Wizard? – BillyNair Mar 23 '19 at 6:21
  • @PeterCJ - I changed the colors in the UDL Wizard so that I could read the code enough to get by until I found where it was defined previously. (So, the screenshots would only show what I have now, a "Band-aid fix" and not what I was originally seeing (Black on White showing in the Wizard but nothing close to the muted blues and grays I was seeing) BUT... in your answer I might have found the issue, if I understand what you are saying: You did NOT have a LESS UDL previous to this discussion and you were getting similar colors to mine? if so, then, I dont have LESS defined elsewhere? – BillyNair Mar 23 '19 at 6:43

The right place to set colors for your user-defined-language is in Language > Define your language...

From my experiments, UDL inherits some of the defaults from Style Configurator -- including "Global Styles > Current Line Background Color", which defines what the active line looks like -- though it only pays attention to the "background" setting for that one; and if you only have one line in the file, it will look like that "current line background color", rather than what's set in the UDL. From what I can tell, UDL doesn't have a setting to override the active-line colors, so it may cause some confusion in that regard.

But if I create a brand-new UDL called "LESS", and don't apply any new settings, the active line of text is a black (set from UDL > Default Style) on muted blue (set from Style Configurator > Global Styles > Current Line Background Color). Any other lines are black on white (set from the UDL > Default Style)

In v7.6.3 and earlier, all UDL information -- names and colors -- are in the userDefineLang.xml (usually in %AppData%\notepad++). In v7.6.4, the release notes link to this Community Forum post by the developer, which explains there is a new userDefineLangs\ subdirectory which can hold any number of .xml files, all of which can contain user defined languages (which makes it easier to copy or import a UDL from someone else).

| 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.