]> git.lizzy.rs Git - micro.git/blob - runtime/help/defaultkeys.md
better top
[micro.git] / runtime / help / defaultkeys.md
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 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 ### File Operations
56
57 | Key       | Description of function                                           |
58 |---------- |------------------------------------------------------------------ |
59 | Ctrl+Q    | Close current file (quits micro if this is the last file open)    |
60 | Ctrl+O    | Open a file (prompts for filename)                                |
61 | Ctrl+S    | Save current file                                                 |
62
63 ### Text operations
64
65 | Key                                 | Description of function                   |
66 |------------------------------------ |------------------------------------------ |
67 | Ctrl(Alt on Mac)+Shift+RightArrow   | Select word right                         |
68 | Ctrl(Alt on Mac)+Shift+LeftArrow    | Select word left                          |
69 | Alt(Ctrl on Mac)+Shift+LeftArrow    | Select to start of current line           |
70 | Alt(Ctrl on Mac)+Shift+RightArrow   | Select to end of current line             |
71 | Shift+Home                          | Select to start of current line           |
72 | Shift+End                           | Select to end of current line             |
73 | Ctrl+Shift+UpArrow                  | Select to start of file                   |
74 | Ctrl+Shift+DownArrow                | Select to end of file                     |
75 | Ctrl+X                              | Cut selected text                         |
76 | Ctrl+C                              | Copy selected text                        |
77 | Ctrl+V                              | Paste                                     |
78 | Ctrl+K                              | Cut current line                          |
79 | Ctrl+D                              | Duplicate current line                    |
80 | Ctrl+Z                              | Undo                                      |
81 | Ctrl+Y                              | Redo                                      |
82 | Alt+UpArrow                         | Move current line or selected lines up    |
83 | Alt+DownArrow                       | Move current line of selected lines down  |
84 | Alt+Backspace or Alt+Ctrl+H         | Delete word left                          |
85 | Ctrl+A                              | Select all                                |
86
87 ### Macros
88
89 | Key       | Description of function                                                           |
90 |---------- |---------------------------------------------------------------------------------- |
91 | Ctrl+U    | Toggle macro recording (press Ctrl+U to start recording and press again to stop)  |
92 | Ctrl+J    | Run latest recorded macro                                                         |
93
94 ### Multiple cursors
95
96 | Key               | Description of function                                                                       |
97 |------------------ |---------------------------------------------------------------------------------------------- |
98 | Alt+N             | Create new multiple cursor from selection (will select current word if no current selection)  |
99 | AltShiftUp        | Spawn a new cursor on the line above the current one                                          |
100 | AltShiftDown      | Spawn a new cursor on the line below the current one                                          |
101 | Alt+P             | Remove latest multiple cursor                                                                 |
102 | Alt+C             | Remove all multiple cursors (cancel)                                                          |
103 | Alt+X             | Skip multiple cursor selection                                                                |
104 | Alt+M             | Spawn a new cursor at the beginning of every line in the current selection                    |
105 | Ctrl+MouseLeft    | Place a multiple cursor at any location                                                       |
106
107 ### Other
108
109 | Key       | Description of function                                                               |
110 |---------- |-------------------------------------------------------------------------------------- |
111 | Ctrl+G    | Open help file                                                                        |
112 | Ctrl+H    | Backspace (old terminals do not support the backspace key and use Ctrl+H instead)     |
113 | Ctrl+R    | Toggle the line number ruler                                                          |
114
115 ### Emacs style actions
116
117 | Key       | Description of function   |
118 |---------- |-------------------------- |
119 | Alt+F     | Next word                 |
120 | Alt+B     | Previous word             |
121 | Alt+A     | Move to start of line     |
122 | Alt+E     | Move to end of line       |
123
124 ### Function keys.
125
126 Warning! The function keys may not work in all terminals! 
127
128 | Key   | Description of function   |
129 |------ |-------------------------- |
130 | F1    | Open help                 |
131 | F2    | Save                      |
132 | F3    | Find                      |
133 | F4    | Quit                      |
134 | F7    | Find                      |
135 | F10   | Quit                      |