scopatz / nanorc

Improved Nano Syntax Highlighting Files
Other
3k stars 549 forks source link

`brightblack` Makes Text Invisible on Black Terminals #346

Open iocouto opened 3 years ago

iocouto commented 3 years ago

Black is a very common background colour for terminals, yet the latest upgrades to nanorc seem to have changed several of the syntax files, so that comments are shown in brightblack. This means the text basically disappears from the screen.

Comments are usually displayed in a 'dimmed' font, so as to be unobtrusive, but brightblack will make them comfortably visible only in a very small number of terminals. Comments are a very important part of the documentation of many conf and ini files, so having them be readable is quite important - e.g., try opening 'php.ini' right now on a black terminal, with the current settings.

iocouto commented 3 years ago

As pointed out in Issue #347, it seems that currently 'brightblack' text is displayed by nano as simply 'black', and is therefore invisible on black terminals.

LoganDark commented 2 years ago

brightblack should be a grey color. It's a problem with your terminal color scheme if it is 100% black for you.

I'm running nano 6.0 and brightblack works fine for me

image

delameter commented 2 years ago

that did the trick for me:

sed --follow-symlinks -i.bak -E -e '/^color/ s/black/white/g' .config/nano/scopatz-nanorc/*

this will edit files in-place, but before that create backups in the same directory. to disable backing up replace -i.bak with -i

delameter commented 2 years ago

i made a little bit of research - the problem is "brightblack" transforms into \e[1;30m, that is control sequence for making the text bold (1) and black (30). not all terminals display bold in brighter colors. what it should be transformed into - \e[90m, that's code for gray color, or "bright black"

image

image