|
| 1 | +Overview of nano's shortcuts |
| 2 | +===================================== |
| 3 | + |
| 4 | +# The editor's keystrokes and their functions |
| 5 | + |
| 6 | +## File handling** |
| 7 | + |
| 8 | +| Shortcut | Description | |
| 9 | +|:--|:--| |
| 10 | +| Ctrl+S | Save current file | |
| 11 | +| Ctrl+O | Offer to write file ("Save as") | |
| 12 | +| Ctrl+R | Insert a file into current one | |
| 13 | +| Ctrl+X | Close buffer, exit from nano | |
| 14 | + |
| 15 | +## **Editing** |
| 16 | + |
| 17 | +| Shortcut | Description | |
| 18 | +|:--|:--| |
| 19 | +| Ctrl+K | Cut current line into cutbuffer | |
| 20 | +| Alt+6 | Copy current line into cutbuffer | |
| 21 | +| Ctrl+U | Paste contents of cutbuffer | |
| 22 | +| Alt+T | Cut until end of buffer | |
| 23 | +| Ctrl+\] | Complete current word | |
| 24 | +| Alt+3 | Comment/uncomment line/region | |
| 25 | +| Alt+U | Undo last action | |
| 26 | +| Alt+E | Redo last undone action | |
| 27 | + |
| 28 | +## **Search and replace** |
| 29 | + |
| 30 | +| Shortcut | Description | |
| 31 | +|:--|:--| |
| 32 | +| Ctrl+Q | Start backward search | |
| 33 | +| Ctrl+W | Start forward search | |
| 34 | +| Alt+Q | Find next occurrence backward | |
| 35 | +| Alt+W | Find next occurrence forward | |
| 36 | +| Alt+R | Start a replacing session | |
| 37 | + |
| 38 | +## Deletion |
| 39 | + |
| 40 | +| Shortcut | Description | |
| 41 | +|:--|:--| |
| 42 | +| Ctrl+H | Delete character before cursor | |
| 43 | +| Ctrl+D | Delete character under cursor | |
| 44 | +| Alt+Bsp | Delete word to the left | |
| 45 | +| Ctrl+Del | Delete word to the right | |
| 46 | +| Alt+Del | Delete current line | |
| 47 | + |
| 48 | +## Operations |
| 49 | + |
| 50 | +| Shortcut | Description | |
| 51 | +|:--|:--| |
| 52 | +| Ctrl+T | Execute some command | |
| 53 | +| Ctrl+J | Justify paragraph or region | |
| 54 | +| Alt+J | Justify entire buffer | |
| 55 | +| Alt+B | Run a syntax check | |
| 56 | +| Alt+F | Run a formatter/fixer/arranger | |
| 57 | +| Alt+: | Start/stop recording of macro | |
| 58 | +| Alt+; | Replay macro | |
| 59 | + |
| 60 | +## Moving around |
| 61 | + |
| 62 | +| Shortcut | Description | |
| 63 | +|:--|:--| |
| 64 | +| Ctrl+B | One character backward | |
| 65 | +| Ctrl+F | One character forward | |
| 66 | +| Ctrl+**←** | One word backward | |
| 67 | +| Ctrl+**→** | One word forward | |
| 68 | +| Ctrl+A | To start of line | |
| 69 | +| Ctrl+E | To end of line | |
| 70 | +| Ctrl+P | One line up | |
| 71 | +| Ctrl+N | One line down | |
| 72 | +| Ctrl+**↑** | To previous block | |
| 73 | +| Ctrl+**↓** | To next block | |
| 74 | +| Ctrl+Y | One page up | |
| 75 | +| Ctrl+V | One page down | |
| 76 | +| Alt+\\ | To top of buffer | |
| 77 | +| Alt+/ | To end of buffer | |
| 78 | + |
| 79 | +## Special movement |
| 80 | + |
| 81 | +| Shortcut | Description | |
| 82 | +|:--|:--| |
| 83 | +| Alt+G | Go to specified line | |
| 84 | +| Alt+\] | Go to complementary bracket | |
| 85 | +| Alt+**↑** | Scroll viewport up | |
| 86 | +| Alt+**↓** | Scroll viewport down | |
| 87 | +| Alt+< | Switch to preceding buffer | |
| 88 | +| Alt+> | Switch to succeeding buffer | |
| 89 | + |
| 90 | +## Information |
| 91 | + |
| 92 | +| Shortcut | Description | |
| 93 | +|:--|:--| |
| 94 | +| Ctrl+C | Report cursor position | |
| 95 | +| Alt+D | Report line/word/character count | |
| 96 | +| Ctrl+G | Display help text | |
| 97 | + |
| 98 | +## Various |
| 99 | + |
| 100 | +| Shortcut | Description | |
| 101 | +|:--|:--| |
| 102 | +| Alt+A | Turn the mark on/off | |
| 103 | +| Tab | Indent marked region | |
| 104 | +| Shift+Tab | Unindent marked region | |
| 105 | +| Alt+V | Enter next keystroke verbatim | |
| 106 | +| Alt+N | Turn line numbers on/off | |
| 107 | +| Alt+P | Turn visible whitespace on/off | |
| 108 | +| Alt+X | Hide or unhide the help lines | |
| 109 | +| Ctrl+L | Refresh the screen | |
0 commit comments