8

I'm trying to use a custom syntax highlighter, but I can't set the background colour.

This is wrong, how do I colour the empty background / white space, per file type not a global override?

2 Answers 2

7
  1. Click Settings, Style Configurator.
  2. In the right half of the pane for "Global Styles: Global override" click the color box next to background color to choose your color.
  3. Check the box that says "enable global background color"
2
  • 2
    That will override it for all file types, is it possible to do it for only one?
    – Neros
    Jan 2, 2014 at 6:10
  • 1
    I don't believe so. This is the closest option for what you are trying to do.
    – Brad
    Jan 2, 2014 at 6:12
16

While browsing for something similar myself, I've found a possible aid to this problem.

In the user-defined language style configuration menu (found under Language > Define your language...), you can right click the color panel, and it will become hatched. This allows it to simply use the default coloration for this section.

Unfortunately, I don't yet see a way to define a background color specific to a user-defined language.

Example:

Screenshot link

Credit for this solution comes from this thread.

5
  • Welcome to Super User! This is really a comment and not an answer to the original question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – DavidPostill
    Jul 11, 2015 at 23:07
  • I've just stumbled on this after trying to setup a custom style for julia I found online. This was extremely helpful! Thanks!
    – mkln
    May 24, 2016 at 10:57
  • @DavidPostill This is definitely the correct answer to fix one specific UDL in Notepad++, as requested. Brad's answer breaks Find result highlighting. Jun 9, 2016 at 13:25
  • @CeesTimmerman The OP says "how do I colour the empty background / white space" not the font background colour!
    – DavidPostill
    Jun 9, 2016 at 13:31
  • Indeed. The "syntax highlighter" part threw me off. Jun 9, 2016 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .