If Not True Then False

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...
Categories:

8 Comments

Leave a Comment

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

Input your comment.
help

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Input your name.

Łukasz

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 Reply
Patrick Dickey

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 Reply
JR

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 Reply
a

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 Reply
JR

Hi Ahammed,

Do you mean how to run nano?

Open terminal and type nano.

reply Reply