Nano — The Editor That Shows Its Keys
Not every edit is worth learning a new way of thinking. When Asha just needs to change one line in a config file, Nano is the quickest way in. It has no modes, and a list of shortcuts sits at the bottom of the screen the whole time.
The rule
Nano types what you press; Ctrl does the rest.
$ nano ~/garden/notes.txtAs soon as the file opens, you can type and the text goes in, just like a normal text box. Every command is a key combination, and the most useful ones are listed along the bottom edge. You only need to know how that list is written:
^means Ctrl. So^Xis Ctrl+X.M-means Meta, which is usually Alt (or Esc on some keyboards). SoM-Uis Alt+U.
The keys you'll use every day:
| Shortcut | Nano calls it | Does |
|---|---|---|
^O |
Write Out | save the file; press Enter to confirm the name |
^X |
Exit | quit, asking whether to save if there are changes |
^K |
Cut | cut the whole current line |
^U |
Paste | paste the last cut text |
^W |
Where Is | search |
^_ |
Go To Line | jump to a line number |
M-U |
Undo | undo the last change |
^G |
Help | show every shortcut |
When you press ^X with unsaved changes, Nano asks "Save modified buffer?" and you answer Y or N. If you say Y, it shows the filename; press Enter to keep it.