| 1 |
# Default Keys |
| 2 |
|
| 3 |
Below are simple charts of the default hotkeys and their functions. For more |
| 4 |
information about binding custom hotkeys or changing default bindings, please |
| 5 |
run `> help keybindings` |
| 6 |
|
| 7 |
Please remember that *all* keys here are rebindable! If you don't like it, you |
| 8 |
can change it! |
| 9 |
|
| 10 |
### Power user |
| 11 |
|
| 12 |
| Key | Description of function | |
| 13 |
|---------- |-------------------------------------------------------------------------------------------------- | |
| 14 |
| Ctrl-e | Open a command prompt for running commands (see `> help commands` for a list of valid commands). | |
| 15 |
| Tab | In command prompt, it will autocomplete if possible. | |
| 16 |
| Ctrl-b | Run a shell command (this will close micro while your command executes). | |
| 17 |
|
| 18 |
### Navigation |
| 19 |
|
| 20 |
| Key | Description of function | |
| 21 |
|---------------------------- |------------------------------------------------------------------------------------------ | |
| 22 |
| Arrows | Move the cursor around | |
| 23 |
| Shift-arrows | Move and select text | |
| 24 |
| Alt(Ctrl on Mac)-LeftArrow | Move to the beginning of the current line | |
| 25 |
| Alt(Ctrl on Mac)-RightArrow | Move to the end of the current line | |
| 26 |
| Home | Move to the beginning of text on the current line | |
| 27 |
| End | Move to the end of the current line | |
| 28 |
| Ctrl(Alt on Mac)-LeftArrow | Move cursor one word left | |
| 29 |
| Ctrl(Alt on Mac)-RightArrow | Move cursor one word right | |
| 30 |
| Alt-{ | Move cursor to previous empty line, or beginning of document | |
| 31 |
| Alt-} | Move cursor to next empty line, or end of document | |
| 32 |
| PageUp | Move cursor up one page | |
| 33 |
| PageDown | Move cursor down one page | |
| 34 |
| Ctrl-Home or Ctrl-UpArrow | Move cursor to start of document | |
| 35 |
| Ctrl-End or Ctrl-DownArrow | Move cursor to end of document | |
| 36 |
| Ctrl-l | Jump to a line in the file (prompts with #) | |
| 37 |
| Ctrl-w | Cycle between splits in the current tab (use `> vsplit` or `> hsplit` to create a split) | |
| 38 |
|
| 39 |
### Tabs |
| 40 |
|
| 41 |
| Key | Description of function | |
| 42 |
|-------- |-------------------------- | |
| 43 |
| Ctrl-t | Open a new tab | |
| 44 |
| Alt-, | Previous tab | |
| 45 |
| Alt-. | Next tab | |
| 46 |
|
| 47 |
### Find Operations |
| 48 |
|
| 49 |
| Key | Description of function | |
| 50 |
|---------- |------------------------------------------ | |
| 51 |
| Ctrl-f | Find (opens prompt) | |
| 52 |
| Ctrl-n | Find next instance of current search | |
| 53 |
| Ctrl-p | Find previous instance of current search | |
| 54 |
|
| 55 |
Note: `Ctrl-n` and `Ctrl-p` should be used from the main buffer, not from inside |
| 56 |
the search prompt. After `Ctrl-f`, press enter to complete the search and then |
| 57 |
you can use `Ctrl-n` and `Ctrl-p` to cycle through matches. |
| 58 |
|
| 59 |
### File Operations |
| 60 |
|
| 61 |
| Key | Description of function | |
| 62 |
|---------- |------------------------------------------------------------------ | |
| 63 |
| Ctrl-q | Close current file (quits micro if this is the last file open) | |
| 64 |
| Ctrl-o | Open a file (prompts for filename) | |
| 65 |
| Ctrl-s | Save current file | |
| 66 |
|
| 67 |
### Text operations |
| 68 |
|
| 69 |
| Key | Description of function | |
| 70 |
|------------------------------------ |------------------------------------------ | |
| 71 |
| Ctrl(Alt on Mac)-Shift-RightArrow | Select word right | |
| 72 |
| Ctrl(Alt on Mac)-Shift-LeftArrow | Select word left | |
| 73 |
| Alt(Ctrl on Mac)-Shift-LeftArrow | Select to start of current line | |
| 74 |
| Alt(Ctrl on Mac)-Shift-RightArrow | Select to end of current line | |
| 75 |
| Shift-Home | Select to start of current line | |
| 76 |
| Shift-End | Select to end of current line | |
| 77 |
| Ctrl-Shift-UpArrow | Select to start of file | |
| 78 |
| Ctrl-Shift-DownArrow | Select to end of file | |
| 79 |
| Ctrl-x | Cut selected text | |
| 80 |
| Ctrl-c | Copy selected text | |
| 81 |
| Ctrl-v | Paste | |
| 82 |
| Ctrl-k | Cut current line | |
| 83 |
| Ctrl-d | Duplicate current line | |
| 84 |
| Ctrl-z | Undo | |
| 85 |
| Ctrl-y | Redo | |
| 86 |
| Alt-UpArrow | Move current line or selected lines up | |
| 87 |
| Alt-DownArrow | Move current line or selected lines down | |
| 88 |
| Alt-Backspace or Alt-Ctrl-h | Delete word left | |
| 89 |
| Ctrl-a | Select all | |
| 90 |
| Tab | Indent selected text | |
| 91 |
| Shift-Tab | Unindent selected text | |
| 92 |
|
| 93 |
### Macros |
| 94 |
|
| 95 |
| Key | Description of function | |
| 96 |
|---------- |---------------------------------------------------------------------------------- | |
| 97 |
| Ctrl-u | Toggle macro recording (press Ctrl-u to start recording and press again to stop) | |
| 98 |
| Ctrl-j | Run latest recorded macro | |
| 99 |
|
| 100 |
### Multiple cursors |
| 101 |
|
| 102 |
| Key | Description of function | |
| 103 |
|------------------ |---------------------------------------------------------------------------------------------- | |
| 104 |
| Alt-n | Create new multiple cursor from selection (will select current word if no current selection) | |
| 105 |
| Alt-Shift-Up | Spawn a new cursor on the line above the current one | |
| 106 |
| Alt-Shift-Down | Spawn a new cursor on the line below the current one | |
| 107 |
| Alt-p | Remove latest multiple cursor | |
| 108 |
| Alt-c | Remove all multiple cursors (cancel) | |
| 109 |
| Alt-x | Skip multiple cursor selection | |
| 110 |
| Alt-m | Spawn a new cursor at the beginning of every line in the current selection | |
| 111 |
| Ctrl-MouseLeft | Place a multiple cursor at any location | |
| 112 |
|
| 113 |
### Other |
| 114 |
|
| 115 |
| Key | Description of function | |
| 116 |
|---------- |-------------------------------------------------------------------------------------- | |
| 117 |
| Ctrl-g | Open help file | |
| 118 |
| Ctrl-h | Backspace (old terminals do not support the backspace key and use Ctrl+H instead) | |
| 119 |
| Ctrl-r | Toggle the line number ruler | |
| 120 |
|
| 121 |
### Emacs style actions |
| 122 |
|
| 123 |
| Key | Description of function | |
| 124 |
|---------- |-------------------------- | |
| 125 |
| Alt-f | Next word | |
| 126 |
| Alt-b | Previous word | |
| 127 |
| Alt-a | Move to start of line | |
| 128 |
| Alt-e | Move to end of line | |
| 129 |
|
| 130 |
### Function keys. |
| 131 |
|
| 132 |
Warning! The function keys may not work in all terminals! |
| 133 |
|
| 134 |
| Key | Description of function | |
| 135 |
|------ |-------------------------- | |
| 136 |
| F1 | Open help | |
| 137 |
| F2 | Save | |
| 138 |
| F3 | Find | |
| 139 |
| F4 | Quit | |
| 140 |
| F7 | Find | |
| 141 |
| F10 | Quit | |