M+A | Turn the mark on/off |
Tab | Indent marked region |
Shift+Tab | Unindent marked region |
M+N | Turn line numbers on/off |
M+P | Turn visible whitespace on/off |
M+V | Enter next keystroke verbatim |
^+L | Refresh the screen |
^+Z | Suspend nano |
Tag: Nano Cheat Sheet
GNU nano is a text editor for Unix-like computing systems or operating environments using a command-line interface. Nano cheat sheet tries to provide a basic reference for beginner and advanced developers, lower the entry barrier for newcomers, and help veterans refresh the old tricks.
Alt+A | Turn the mark on/off |
Tab | Indent marked region |
Shift+Tab | Unindent marked region |
Alt+N | Turn line numbers on/off |
Alt+P | Turn visible whitespace on/off |
Alt+V | Enter next keystroke verbatim |
Ctrl+L | Refresh the screen |
Ctrl+Z | Suspend nano |
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 |
^Ctrl+T | Run a spell check |
^+J | Justify paragraph or region |
M+J | Justify entire buffer |
M+B | Run a syntax check |
M+F | Run a formatter/fixer/arranger |
M+: | Start/stop recording of macro |
M+; | Replay macro |
^+H | Delete character before cursor |
^+D | Delete character under cursor |
^+Shift+Del | Delete word to the left |
^+Del | Delete word to the right |
M+Del | Delete current line |
^+C | Report cursor position |
M+D | Report word/line/char count |
^+G | Display help text |
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 |
M+G | Go to specified line |
M+] | Go to complementary bracket |
M+↑ | Scroll viewport up |
M+↓ | Scroll viewport down |
M+< | Switch to preceding buffer |
M+> | Switch to succeeding buffer |
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 |
^+Q | Start backward search |
^+W | Start forward search |
M+Q | Find next occurrence backward |
M+W | Find next occurrence forward |
M+R | Start a replacing session |
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 |
^+K | Cut current line into cutbuffer |
M+6 | Copy current line into cutbuffer |
^+U | Paste contents of cutbuffer |
M+T | Cut until end of buffer |
^+] | Complete current word |
M+3 | Comment/uncomment line/region |
M+U | Undo last action |
M+E | Redo last undone 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 |
^+B | One character backward |
^+F | One character forward |
^+← | One word backward |
^+→ | One word forward |
^+A | To start of line |
^+E | To end of line |
^+P | One line up |
^+N | One line down |
^+↑ | To previous block |
^+↓ | To next block |
^+Y | One page up |
^+V | One page down |
M+\ | To top of buffer |
M+/ | To end of buffer |
Ctrl+H | Delete character before cursor |
Ctrl+D | Delete character under cursor |
Ctrl+Shift+Del | Delete word to the left |
Ctrl+Del | Delete word to the right |
Alt+Del | Delete current line |
^+S | Save current file |
^+O | Offer to write file (“Save as”) |
^+R | Insert a file into current one |
^+X | Close buffer, exit from nano |
Ctrl+T | Run a spell check |
Ctrl+J | Justify paragraph or region |
Alt+J | Justify entire buffer |
Alt+B | Run a syntax check |
Alt+F | Run a formatter/fixer/arranger |
Alt+: | Start/stop recording of macro |
Alt+; | Replay macro |