Nano Text Editor and nanorc Tips and Tricks - Comment Page: 1

Nano is easy to use and lightweight command line text editor for Linux and UNIX systems. Nano text editor can use either the default settings or improve settings with customized nanorc-file. Here are some tips that can improve the usability of Nano. Changes can be made to nanorc file, either locally or to all users or options can be used as command line options. First is good to check Nano compiled options, with command: nano -V Nano should be compiled with --enable-nanorc option. Example configuration file can be copied from /usr/share/doc/nano-[version]/nanorc.sample. If you want to add the settings to all users, then copy nanorc to the /etc/nanorc and if you want to add the...

9 comments on “Nano Text Editor and nanorc Tips and Tricks - Comment Page: 1

    1. Wow, I didn’t know that nano can handle that – I always looked at it as a small, good for oneline editing tool and nothing else.

      …but still doesn’t beat vim :-)

      Reply
    2. […] Post: http://www.if-not-true-then-false.com/2009/tuning-nano-text-editor-with-nanorc/ This entry was posted in Development by eliofilipe. Bookmark the […]

      Reply
    3. If you back up a file using “set backup” how do you recover the previous version of it (or even open the file in nano)? I have files backed up in another directory, and need to either copy something from one into the current version, or restore the previous version totally (it’s technically my crontab file).

      Thanks, and have a great weekend.:)
      Patrick.

      Reply
      • Hi Patrick,

        Just checked this and backup file name format is following:

        
        !home!test_user!testing~
        !var!www!testing~
        !tmp!testing~
        

        So it’s full path and file names. Try to list your backup dir:

        
        ls -la /path/to/backup-dir
        
        Reply
    4. I am surprised you didn’t talk about the -c command line argument that displays the current position of the cursor.

      nanorc row:
      set const
      command line option:
      -c or --const

      You could also add in the last section
      man nanorc

      Reply
    5. Comment how to runa program

      Reply
      • Hi Ahammed,

        Do you mean how to run nano?

        Open terminal and type nano.

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close