Nano

File Handling

Shortcut

Action

Ctrl+S

Save current file

Ctrl+O

Offer to write file (Save As)

Ctrl+R

Insert a file into current one

Ctrl+X

Close buffer, exit from nano

Editing

Shortcut

Action

Ctrl+K

Cut current line into cutbuffer

Alt+6

Copy current line into cutbuffer

Ctrl+U

Paste contents of cutbuffer

Alt+T

Cut until end of buffer

Ctrl+]

Complete current word

Alt+3

Comment/uncomment line/region

Alt+U

Undo last action

Alt+E

Redo last undone action

Search and Replace

Shortcut

Action

Ctrl+Q

Start backward search

Ctrl+W

Start forward search

Alt+Q

Find next occurrence backward

Alt+W

Find next occurrence forward

Alt+R

Start a replacing session

Deletion

Shortcut

Action

Ctrl+H

Delete character before cursor

Ctrl+D

Delete character under cursor

Alt+Bsp

Delete word to the left

Ctrl+Del

Delete word to the right

Alt+Del

Delete current line

Information

Shortcut

Action

Ctrl+C

Report cursor position

Alt+D

Report line/word/character count

Ctrl+G

Display help text

Moving Around

Shortcut

Action

Ctrl+B

One character backward

Ctrl+F

One character forward

Ctrl+

One word backward

Ctrl+

One word forward

Ctrl+A

To start of line

Ctrl+E

To end of line

Ctrl+P

One line up

Ctrl+N

One line down

Ctrl+

To previous block

Ctrl+

To next block

Ctrl+Y

One page up

Ctrl+V

One page down

Alt+\

To top of buffer

Alt+/

To end of buffer

Special movement

Shortcut

Action

Alt+G

Go to specified line

Alt+]

Go to complementary bracket

Alt+

Scroll viewport up

Alt+

Scroll viewport down

Alt+<

Switch to preceding buffer

Alt+>

Switch to succeeding buffer

Various

Shortcut

Action

Alt+A

Turn the mark on/off

Tab

Indent marked region

Shift+Tab

Unindent marked region

Alt+V

Enter next keystroke verbatim

Alt+N

Turn line numbers on/off

Alt+P

Turn visible whitespace on/off

Alt+X

Hide or unhide the help lines

Ctrl+L

Refresh the screen