maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Warning to anyone using GNU nano from Extras! (https://talk.maemo.org/showthread.php?t=64099)

GameboyRMH 2010-10-20 13:46

Warning to anyone using GNU nano from Extras!
 
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!

jedi 2010-10-20 13:47

Re: Warning to anyone using GNU nano from Extras!
 
Real men don't use Nano....

pelago 2010-10-20 13:48

Re: Warning to anyone using GNU nano from Extras!
 
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.

GameboyRMH 2010-10-20 13:49

Re: Warning to anyone using GNU nano from Extras!
 
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 :p

Tigerite 2010-10-20 13:54

Re: Warning to anyone using GNU nano from Extras!
 
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 2010-10-20 13:58

Re: Warning to anyone using GNU nano from Extras!
 
Quote:

Originally Posted by GameboyRMH (Post 846096)
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 :p

Vi is very handy for making quick changes to text files from the terminal.

I'm not a masochist either.

GameboyRMH 2010-10-20 14:01

Re: Warning to anyone using GNU nano from Extras!
 
Quote:

Originally Posted by Tigerite (Post 846100)
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)

Tigerite 2010-10-20 14:02

Re: Warning to anyone using GNU nano from Extras!
 
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 ;)

GameboyRMH 2010-10-20 16:17

Re: Warning to anyone using GNU nano from Extras!
 
I've just noticed some inconsistent behavior using /etc/nanorc, going to update my first post to recommend ~/.nanorc

int_ua 2013-10-23 16:12

Re: Warning to anyone using GNU nano from Extras!
 
Quote:

Originally Posted by jedi (Post 846093)
Real men don't use Nano....

What an offensive comment with nothing but ********. Oh, we have autoreplace here. It was the BS word.


All times are GMT. The time now is 09:53.

vBulletin® Version 3.8.8