Foreground options for Selected text?
-
It’s been almost THREE YEARS since this was last replied to and I don’t see any changes on that very basic missing feature that requires hacks described here.
Before I found out about the nppexec hack, not being able to define the “selected text” color was THE issue that prevented me from using Notepad++ as I am working on as many applications as I can with light text on a dark background, after suffering for far too long working on white backgrounds ever since it became fashionable when Macs and Windows came out with the erroneous belief that ‘paper white’ backgrounds are better for you, when, in fact computer white screens are NOT like paper, but rather much more like looking at a blinding flashlight. Fortunately, this is finally being realized as a second generation of computer users are demanding a remedy and now so many web sites and plugins and applications have ‘dark mode’ available.
Isn’t it high time for Notepad++ developers to make this fundamental, basic missing feature a priority? Am I correct in guessing the only reason that hasn’t been done so far, is that it would require a complete rewrite of the basic Notepad++ code?
For those using Notepad++ with dark grey background (RGB 16,16,16) with normal text as 192,192,192, using the nppexec plugin (nppexec.dll in \plugins\nppexec) and looking for a quick way to get the selected text to inverse these colors (in effect, get your selected text to be that of the background and the selected area to be that of the normal text color, as a true inverse), here’s my code:
put these in \plugins\config:
npes_saved.txt:
::Black_Selected
NPP_CONSOLE ?
SCI_SENDMSG 2067 1 1052688nppexec.ini:
[Options]
ScriptNppStart=“Black_Selected”
[Console]
Visible=0
ShowHelp=0
Encoding=17
SaveOnExecute=0
CmdHistory=1
SaveCmdHistory=1
TextColorNormal=0(6)
TextColorError=A01010
TextColorMessage=208020
BackgroundColor=00
NoInternalMsgs=0
[Restore]
LastSelectedScript=1Remember, the key part you need to customize to get the highlighted text to be that of your normal background color (when set as RGB 16,16,16) is the line:
SCI_SENDMSG 2067 1 1052688
The last number is what determines the color of the text when selected, using this formula: (65536blue value)+(256green value)+(red value) - note, it’s in the inverse order of the customary RGB order - transposing 16 for each B, G and R (my normal background color), you get 1052688 while the selection itself is set in the Stylers configuration as 192,192,192 (same as my normal text font color).
Sorry if it comes as a rude wake up after three years, but I thought it needed to be said. Hope the nppexec code helps beginners as a starting point to experiment with.
-
@JohnnyJim-J said in Foreground options for Selected text?:
It’s been almost THREE YEARS since this was last replied to and I don’t see any changes on that very basic missing feature that requires hacks described here.
…
Am I correct in guessing the only reason that hasn’t been done so far, is that it would require a complete rewrite of the basic Notepad++ code?
…
Isn’t it high time for Notepad++ developers to make this fundamental, basic missing feature a priority?As far as technical issues are concerned, I don’t know if there’s a reason it would be hard to be implemented or not. But if it does require a complete rewrite, then it’s not going to happen.
As far as practical reasons, it probably comes back to one return question: Did anyone involved in this thread ever create an official feature request? (I’ll give you a hint, posting in this forum is not an official feature request; see the FAQs for more.) If not, then that is the essential reason why. If an official request is ever made, then at that point, the developers can decide whether or not to prioritize working on it, depending on how useful they think it is.
Sorry if it comes as a rude wake up after three years
It’s not any form of wake up to the developers, because they’re basically uninvolved in the vast majority of discussions in this Community Forum, so your post likely isn’t on their radar at all.
-
@PeterJones said in Foreground options for Selected text?:
As far as technical issues are concerned, I don’t know if there’s a reason it would be hard to be implemented or not. But if it does require a complete rewrite, then it’s not going to happen.
As far as practical reasons, it probably comes back to one return question: Did anyone involved in this thread ever create an official feature request? (I’ll give you a hint, posting in this forum is not an official feature request; see the FAQs for more.) If not, then that is the essential reason why. If an official request is ever made, then at that point, the developers can decide whether or not to prioritize working on it, depending on how useful they think it is.
.
It’s not any form of wake up to the developers, because they’re basically uninvolved in the vast majority of discussions in this Community Forum, so your post likely isn’t on their radar at all.Thanks for the quick checkup 👍 Too bad the developers are not checking the forum like they do with other apps, where the developer checks in on users and gets involved directly, implementing features later on depending on demand and whether it interferes with general operations or not (ie whether it’s a bug, a feature request or whether a ‘problem’ is not in fact a ‘feature’).
-
@JohnnyJim-J said in Foreground options for Selected text?:
Too bad the developers are not checking the forum like they do with other apps
I think the developers spend their time in the official issues list.
There are at this moment 1273 open issues.
So I think they’ve got enough to do there without monitoring here as well.
In a perfect world they’d have time to do both, but… -
Of course, developers could have seen this issue in the issues list in either of these two places:
-
Interesting.
On a new machine: up till now, foreground for selected text has been available, and worked- might have been for a theme other than default, though.
Comment at the end of issue 3397 introduces 11567, great too, so long as it is enabled. :P -
I can’t tell from your comment if you are having troubles or they’ve been solved. If you’re still having troubles, post again in order to clarify what they are?
-
@Alan-Kilborn Hi Alan, just a concern over why the Selected Text Colour button for foreground in the Style Configurator (Global Styles) is disabled. For comparison, the button for background is enabled, but the font styles are disabled. If you could point me to where this is explained, appreciated.
-
@Laurie-Stearn said in Foreground options for Selected text?:
why the Selected Text Colour button for foreground in the Style Configurator (Global Styles) is disabled
It needs a special file created in order to be enabled; see this section of the user manual: https://npp-user-manual.org/docs/config-files/#:~:text=enableSelectFgColor.xml
-
@Alan-Kilborn Good one, thanks.
-
This post is deleted!