4

I have a User Defined Language like this in my Notepad++ v8.5.8

enter image description here

In a light mode, the display looked fine

enter image description here

However, when I used Dark Mode, all the text was highlighted in white, making the display weird

enter image description here

This is my Style Configurator

enter image description here

Is there a way to fix this, that is, remove the white highlight and the text (black font) automatically becomes white so that it's visible on a dark background?

EDIT

Based on Jackdaw's advice, I managed to achieve the desired display with this config

enter image description here

Except for one weird issue: all the numbers - and only numbers - were white-highlighted . What's going on? Was it user error?

enter image description here

0

1 Answer 1

7

In the Default style group frame of the User Defined Language dialog click on the Styler button. You will see the Styler Dialog:

enter image description here

Font colors Foreground and Background is what used to show text in your case.
Apparently the editor uses user-defined colors of the user's font and not global definitions in the theme.

To ignore these definitions and use global theme settings select Transparent checkbox(es) in the Styler Dialog.


UPDATE:

About the second problem: it is related to the syntax highlighting.

To change the behaviour:

  1. Open Language in the main menu, User Defined Language > Define your Language
  2. Click on Comment & Number tab
  3. Then click on Styler in the Number style group frame and set Foreground/Background color to transparent.

enter image description here

9
  • You're a legend. I was wondering if you're kind enough to look at another weird issue in the EDIT part of the OP? Thanks.
    – Nemo
    Commented Jun 14 at 11:04
  • @Nemo: Did you try to set the Foreground color to Transparent too? Because of when I'm selecting Transparent for both, Foreground and Background, I have no problems with the coloring numbers.
    – Jackdaw
    Commented Jun 14 at 11:12
  • 1
    @Nemo: I can't simulate this in my environment. If you will unaccept my answer then somebody will see that problem still not solved and will post another answer to provide whole solution. It's okay. This how it works on the StackOverflow/SuperUser. Sorry.
    – Jackdaw
    Commented Jun 14 at 11:41
  • 2
    @Nemo: I just downloaded the latest version (upgraded my version to v8.6.8) and now I can see numbers are coloring too. See the related question on the forums: 1) Number Color 2) How do I turn off syntax highlighting for txt files in notepad++?
    – Jackdaw
    Commented Jun 14 at 12:43
  • 1
    Amazing. I simply don't know how you could figure these out!!!
    – Nemo
    Commented Jun 16 at 9:27

You must log in to answer this question.

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