timmoore46
Posts: 266
Joined: Tue Jul 17, 2012 4:36 pm

Getting Nano into monochrome !

Mon Feb 25, 2013 6:26 pm

I'm colour blind and when nano offers all sorts of bright pastel colours, I can't read/see the text!

I've fiddled with the 'preferences' but have not got it sorted out.

Does anyone know how to get it into black text only ?

:D :D :D

Tim

stubright
Posts: 109
Joined: Sat Dec 24, 2011 11:12 pm

Re: Getting Nano into monochrome !

Mon Feb 25, 2013 6:54 pm

Hi Tim,
If you press ALT-Y, that will disable colours in the file currently open. The configuration file is usually stored in
/etc/nanorc
it has all the colour settings in there.
You can edit that with
sudo nano /etc/nanorc

Stu

timmoore46
Posts: 266
Joined: Tue Jul 17, 2012 4:36 pm

Re: Getting Nano into monochrome !

Mon Feb 25, 2013 7:04 pm

Hi Stu,

Thats Mega Brill ! Trying it out in next minute !

:D :D :D :D :D :D :D :D :D :D

Tim

timmoore46
Posts: 266
Joined: Tue Jul 17, 2012 4:36 pm

Re: Getting Nano into monochrome-fixed!

Wed Feb 27, 2013 6:57 am

That worked a treat !

Now the next question is line numbers. Can they be displayed cos BASH error messages for scripts give a line number (and not all my scripts work first time! *LOL*)

:D :D :D :D

Tim

DirkS
Posts: 9895
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Getting Nano into monochrome !

Wed Feb 27, 2013 8:20 am

Tim,

Either start nano with option '-c' (e.g. 'nano -c filename') or use Alt-C while editing a file.

The cursor location is shown near the bottom of the screen.

Gr.
Dirk.

DirkS
Posts: 9895
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Getting Nano into monochrome !

Wed Feb 27, 2013 8:30 am

To change the setting permanently uncomment the line 'set const' in /etc/nanorc

Gr.
Dirk.

timmoore46
Posts: 266
Joined: Tue Jul 17, 2012 4:36 pm

Re: Getting Nano into monochrome !

Wed Feb 27, 2013 8:40 am

Mega Brill ! will do that !

Your help is greatly appreciated.

:D :D :D :D :D

Tim

timmoore46
Posts: 266
Joined: Tue Jul 17, 2012 4:36 pm

Re: Getting Nano into monochrome !

Fri Mar 01, 2013 7:44 am

nanorc dealt with color here:-

## Color setup
##
## Format:
##
## syntax "short description" ["filename regex" ...]
##
## The "none" syntax is reserved; specifying it on the command line is
## the same as not having a syntax at all. The "default" syntax is
## special: it takes no filename regexes, and applies to files that
## don't match any other syntax's filename regexes.
##
## color foreground,background "regex" ["regex"...]
## or
## icolor foreground,background "regex" ["regex"...]
##
## "color" will do case sensitive matches, while "icolor" will do case
## insensitive matches.
##
## Valid colors: white, black, red, blue, green, yellow, magenta, cyan.
## For foreground colors, you may use the prefix "bright" to get a
## stronger highlight.
##
## To use multi-line regexes, use the start="regex" end="regex"
## [start="regex" end="regex"...] format.
##
## If your system supports transparency, not specifying a background
## color will use a transparent color. If you don't want this, be sure
## to set the background color to black or white.
##
## If you wish, you may put your syntaxes in separate files. You can
## make use of such files (which can only include "syntax", "color", and
## "icolor" commands) as follows:
##
## include "/path/to/syntax_file.nanorc"
##
## Unless otherwise noted, the name of the syntax file (without the
## ".nanorc" extension) should be the same as the "short description"
## name inside that file. These names are kept fairly short to make
## them easier to remember and faster to type using nano's -Y option.
##
## All regexes should be extended regular expressions.
______

but I couln't see whuch bit to attack...

:? :?

Tim

stubright
Posts: 109
Joined: Sat Dec 24, 2011 11:12 pm

Re: Getting Nano into monochrome !

Fri Mar 01, 2013 6:53 pm

Hi Tim
Try this one
sudo nano /usr/share/nano/nanorc.nanorc

There's quite a few colour config files in the folder
/usr/share/nano/

Stu

stubright
Posts: 109
Joined: Sat Dec 24, 2011 11:12 pm

Re: Getting Nano into monochrome !

Sat Mar 02, 2013 12:43 am

My last post would let you use more suitable colours for your needs but if you want everything white on black then just comment out the 'include' lines in /etc/nanorc at the end of the file.

Stu

Return to “General discussion”