Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
2 contributors

Users who have contributed to this file

@mcandre @apennebaker-ni
182 lines (115 sloc) 1.93 KB

Nano Cheatsheet

Andrew Pennebaker

https://github.com/mcandre/cheatsheets/blob/master/nano.md

About

Nano is a relatively easy to learn command line text editor.

Documentation

nano Command Manual

Nano editor tutorials

The Nano Text Editor

Install

$ apt-get install nano

$ brew install nano

C:\> chocolatey install nano

nano-2.2.5.msi

Configure

$HOME/.nanorc

Reference Dotfile

Additional syntax highlighters:

nano-highlight

Basic Commands

Hotkey Notation

  • ^ = Control
  • M- = Alt ("Meta" key)

Open File

$ nano <file>

$ nano
^R <file>

Windows

C:\> nano <file>

gitbash$ nano <file>

Save As...

^O

Quit

^X

Undo/Redo

M-U

M-E

Cancel Nano Command

^C

Next Search Result

^W

Find and Replace

^\
A

Regular Expressions

^W
M-R

^\
M-R

Cut

^K

Copy

M-6

Paste

^U

Set mark

M-A

Indent/Dedent Line or Marked Block Rigidly

M-}

M-{

Auto-Indent Current Line or Marked Region

TAB

Start/End of File

M-\

M-/

Start/End of Line

^A

^E

Delete

DEL

Alternatives

  • Pico is a precursor to Nano, often installed by default on Unix systems.
  • gEdit is a graphical text editor with a similarly easy learning curve to Nano).
  • Emacs provides many more features than Nano.
  • Vim also provides many more features than Nano.
You can’t perform that action at this time.