Nano/Guide

This guide is meant to be a simple introduction to nano. It will quickly help you to become familiar with its basic operation.

Purpose
This guide was written to cover basic operations in nano, and is meant to be very concise. For more information about nano check out: http://www.nano-editor.org.

Opening and creating files
Opening and creating files is simple in nano, simply type:

Nano is a modeless editor so you can start typing immediately to insert text. If you are editing a configuration file like use the   switch to disable wrapping on long lines as it might render the configuration file unparseable by whatever tools depend on it. For example:

Saving and exiting
If you want to save the changes you've made, press +. To exit nano, type +. If you ask nano to exit from a modified file, it will ask you if you want to save it. Just press in case you don't, or  in case you do. It will then ask you for a filename. Just type it in and press.

If you accidentally confirmed that you want to save the file but you actually don't, you can always cancel by pressing +  when you're prompted for a filename.

Cutting and pasting
To cut a single line, you use +  (hold down  and then press ). The line disappears. To paste it, you simply move the cursor to where you want to paste it and punch +. The line reappears. To move multiple lines, simply cut them with several +  in a row, then paste them with a single  +. The whole paragraph appears wherever you want it.

If you need a little more fine-grained control, then you have to mark the text. Move the cursor to the beginning of the text you want to cut. Hit +  (or  + ). Now move your cursor to the end of the text you want to cut: the marked text gets highlighted. If you need to cancel your text marking, simply hit +  again. Press +  to cut the marked text. Use +  to paste it.

Searching for text
Searching for a string is easy as long as you think "WhereIs" instead of "Search". Simply hit +, type in your search string, and press. To search for the same string again, hit +.

More options
If you're interested in tweaking nano, be sure to read.

Wrap up
That is all! Thanks to kiyose and quazion from #gentoo. Again, for more information about nano check out: http://www.nano-editor.org.