Skip to content

Latest commit

 

History

History
181 lines (115 loc) · 1.93 KB

nano.md

File metadata and controls

181 lines (115 loc) · 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.