Getting started with Nano
Nano, a clone of Pico, emulates the functionality of Pico. Pico is a simple full screen ASCII editor for UNIX systems developed at the University of Washington.
Although we will cover only the basics of the Nano editor, you are invited to use the online help to explore the other features of Nano on your own.
The circumflex (^) denotes a CONTROL key press. Examples are shown in
Courier typeface; user input is shown in boldface.
To start Pico with a blank page, at the unix % prompt type:
To start Pico with an existing file, at the unix % prompt type:
- nano <filename>
You will either be presented with a blank page or the first page of text from your existing document as shown in Figure 1.
\f0\fs20 \cf2 \expnd0\expndtw0\kerning0
Notice that the bottom of the screen shows the options available to you such as Get Help, Exit, and so forth. Also, note that the cursor (arrow) keys can be used to move around on the page and the backspace key will (if properly set up) erase characters. ^G will provide more information on the menu options.
Moving the Cursor
Assume we have either entered some text or started Nano with an existing document. If the termcap entry for your terminal supports the cursor keypad, you can move the cursor around a character or line at a time using the arrow keys. If you do not have arrow keys or UNIX does not support them on your terminal, you can use the following Control-Key sequences to move the cursor:
If you want to move greater distances, you can use the following Control-Key sequences:
|^A||Move to the beginning of the current line.|
|^E||Move to the end of the current line.|
|^V||Move forward a page of text.|
|^Y||Move backward a page of text.|
To delete individual characters or lines of text, use the following:
|<BACKSPACE>||Delete the character left of the cursor position.|
|^D||Delete the character at the cursor position.|
|^K||Delete (kill) the entire line at the cursor position.|
To undelete lines in which the ^K command was used:
|^U||Undelete last deleted line[s] at the cursor position.|
Input and Output
The following are helpful commands for reading in a file and outputting a file:
|^R||Insert an external file at the current cursor position.|
|^O||Output the current buffer to a file and save it.|
Other Useful Commands
These commands, although not totally necessary, may come in handy:
|^W||Search for (where is) specific text., ignoring case.|
|^L||Refresh the display.|
|^J||Justify the text in the current paragraph.|
|^T||Invoke the spelling checker.|
|^C||Report the cursor position.|
|^G||Get online help.|
When you are done editing and ready to leave Nano, do the following:
|^X||Exit Nano with the option to save the current file.|