Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Warning to anyone using GNU nano from Extras!

    Reply
    Page 1 of 3 | 1   2     3   | Next
    GameboyRMH | # 1 | 2010-10-20, 13:46 | Report

    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!

    Edit | Forward | Quote | Quick Reply | Thanks

    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:
    bingomion, ffha, Helmuth, littlebadger, marmistrz, Mentalist Traceur, mveplus, pelago, ranbaxy, Tigerite, Tstone

     
    jedi | # 2 | 2010-10-20, 13:47 | Report

    Real men don't use Nano....

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to jedi For This Useful Post:
    atilla, MaddogG

     
    pelago | # 3 | 2010-10-20, 13:48 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by pelago; 2010-10-20 at 13:56.
    The Following 2 Users Say Thank You to pelago For This Useful Post:
    benny1967, Helmuth

     
    GameboyRMH | # 4 | 2010-10-20, 13:49 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Tigerite | # 5 | 2010-10-20, 13:54 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jedi | # 6 | 2010-10-20, 13:58 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    GameboyRMH | # 7 | 2010-10-20, 14:01 | Report

    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)

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Tigerite | # 8 | 2010-10-20, 14:02 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    GameboyRMH | # 9 | 2010-10-20, 16:17 | Report

    I've just noticed some inconsistent behavior using /etc/nanorc, going to update my first post to recommend ~/.nanorc

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to GameboyRMH For This Useful Post:
    pelago

     
    int_ua | # 10 | 2013-10-23, 16:12 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to int_ua For This Useful Post:
    pichlo

     
    Page 1 of 3 | 1   2     3   | Next
vBulletin® Version 3.8.8
Normal Logout