Show Menu
Cheatography

nano Text Editor Keyboard Shortcuts by

Arguments, commands and shortcuts for nano, a text editor found on most Unix systems.

Command Line Arguments

-A
Makes the Home key behave more intell­igently (moving to beginning of non-wh­ite­space charac­ters, instead of the beginning of the line, as is default.)
-B
Backs up edits to a copy of the file in the current directory with the suffix ~.
-E
Convert typed tabs to spaces.
-L
Don't add newlines to the ends of files.
-N
Disable automatic conversion of files from DOS/Mac format.
-O
Use the blank line below the titlebar as extra editing space.
-S
Enable smooth scrolling. Text will scroll line-b­y-line, instead of the usual chunk-­by-­chunk behavior.
-c
Constantly show the cursor position.
-w
disable wrapping of long lines.
-$
Enable softwrap (wraps lines instead of horizontal scrolling.)

NOTE: Because
$
is treated as a variable by many execution enviro­nments, it is advisable to flag this option separately from others you may be using, e.g.:
nano -ALNc -$ textfi­le.txt
nano [OPTIONS] [[+LIN­E,C­OLUMN] FILE]...
 

About nano

Nano is a text editor suited to working in a UNIX-based command line enviro­nment. It is not as powerful as PC window­-based editors, as it does not rely on the mouse, but still has many useful features.
Most nano commands are invoked by holding down the Ctrl key (that is, the control key), and pressing one of the other keys. In this text, the control key is referred to using ^. For example, ^X means "hold down the CTRL key and press the x key''. Most of the important commands are listed at the bottom of your screen when nano is running.

Shortcuts

^G
Display help text.
^O
Write the current file to disk
^X
Exit nano.
^T
Invoke spellc­heck, if installed.
^Y
Next screen.
^V
Previous screen.
^L
Refresh (force redraw) current screen.
^J
Justify current paragraph. (Join together broken lines of text until double newline is encoun­tered.)
^W
Search for a string or regular expres­sion.
^\ 
Search and replace a string or regular expres­sion.
       
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Sublime Text 2 Windows Keyboard Shortcuts
          Sublime Text 3 Keyboard Shortcuts