Reply
Thread Tools
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#1
If anyone is using GNU nano from Extras as a text editor, beware that it automatically inserts line breaks where your lines wrap by default, which could seriously mess up any scripts / system files you're working on! To fix this run:

echo "set nowrap" > ~/.nanorc

This will create a config file (used by both user and root, since they have the same home directory) for nano and tell it not to wrap (usually this is set by default on most distros).

Even experienced Linux users like myself may be used to Nano having nowrap set by default, and might only find that Maemo is different after they mess up a critical config file!
__________________
"Impossible is not in the Maemo vocabulary" - Caballero

Last edited by GameboyRMH; 2010-10-20 at 16:21. Reason: Recommend using ~/.nanorc instead of /etc/nanorc
 

The Following 11 Users Say Thank You to GameboyRMH For This Useful Post:
jedi's Avatar
Posts: 1,411 | Thanked: 1,330 times | Joined on Jan 2010 @ Tatooine
#2
Real men don't use Nano....
 

The Following 2 Users Say Thank You to jedi For This Useful Post:
pelago's Avatar
Posts: 2,121 | Thanked: 1,540 times | Joined on Mar 2008 @ Oxford, UK
#3
Thanks, although I've always used "nano -w" myself for the last few years when I came across the same problem in an old debian. If it's true that most distros these days come with nowrap as standard, then maybe this should be reported as a bug against the maemo nano package.

Last edited by pelago; 2010-10-20 at 13:56.
 

The Following 2 Users Say Thank You to pelago For This Useful Post:
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#4
Nano is very handy for making quick changes to text files from the terminal...if I want something fancy like vi/emacs I'll just use Scite since I'm not a masochist
__________________
"Impossible is not in the Maemo vocabulary" - Caballero
 
Posts: 284 | Thanked: 320 times | Joined on May 2010 @ Peterborough, UK
#5
Actually, with the nano-opt package, this file should be saved in /home/user/.nanorc as I've just discovered - it doesn't read the one in /etc at all.
 
jedi's Avatar
Posts: 1,411 | Thanked: 1,330 times | Joined on Jan 2010 @ Tatooine
#6
Originally Posted by GameboyRMH View Post
Nano is very handy for making quick changes to text files from the terminal...if I want something fancy like vi/emacs I'll just use Scite since I'm not a masochist
Vi is very handy for making quick changes to text files from the terminal.

I'm not a masochist either.
 
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#7
Originally Posted by Tigerite View Post
Actually, with the nano-opt package, this file should be saved in /home/user/.nanorc as I've just discovered - it doesn't read the one in /etc at all.
Huh? I'm using nano-opt and it worked fine for me...

Can anyone else confirm?

(make sure it's /etc/nanorc and not /etc/.nanorc)
__________________
"Impossible is not in the Maemo vocabulary" - Caballero
 
Posts: 284 | Thanked: 320 times | Joined on May 2010 @ Peterborough, UK
#8
Strange, mine just ignored the file completely. I don't know why, but anyway I guess it's better to put it in /home/user as it saves a precious 10 bytes of rootfs space
 
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#9
I've just noticed some inconsistent behavior using /etc/nanorc, going to update my first post to recommend ~/.nanorc
__________________
"Impossible is not in the Maemo vocabulary" - Caballero
 

The Following User Says Thank You to GameboyRMH For This Useful Post:
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#10
Originally Posted by jedi View Post
Real men don't use Nano....
What an offensive comment with nothing but ********. Oh, we have autoreplace here. It was the BS word.
 

The Following User Says Thank You to int_ua For This Useful Post:
Reply

Tags
archetrollogy, elephants fight, yoghurt+martian


 
Forum Jump


All times are GMT. The time now is 16:11.