]> git.lizzy.rs Git - micro.git/blob - runtime/help/defaultkeys.md
Merge pull request #1045 from emilyaviva/master
[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 | Home or CtrlLeftArrow     | Move to the beginning of the current line                                                 |
25 | End or CtrlRightArrow     | Move to the end of the current line                                                       |
26 | AltLeftArrow              | Move cursor one word left                                                                 |
27 | AltRightArrow             | Move cursor one word right                                                                |
28 | Alt+{                     | Move cursor to previous empty line, or beginning of document                              |
29 | Alt+}                     | Move cursor to next empty line, or end of document                                        |
30 | PageUp                    | Move cursor up one page                                                                   |
31 | PageDown                  | Move cursor down one page                                                                 |
32 | CtrlHome or CtrlUpArrow   | Move cursor to start of document                                                          |
33 | CtrlEnd or CtrlDownArrow  | Move cursor to end of document                                                            |
34 | Ctrl+L                    | Jump to a line in the file (prompts with #)                                               |
35 | Ctrl+W                    | Cycle between splits in the current tab (use `> vsplit` or `> hsplit` to create a split)  |
36
37 ### Tabs
38
39 | Key     | Description of function   |
40 |-------- |-------------------------  |
41 | Ctrl+T  | Open a new tab            |
42 | Alt+,   | Previous tab              |
43 | Alt+.   | Next tab                  |
44
45 ### Find Operations
46
47 | Key       | Description of function                   |
48 |--------   |------------------------------------------ |
49 | Ctrl+F    | Find (opens prompt)                       |
50 | Ctrl+N    | Find next instance of current search      |
51 | Ctrl+P    | Find previous instance of current search  |
52
53 ### File Operations
54
55 | Key       | Description of function                                           |
56 |--------   |----------------------------------------------------------------   |
57 | Ctrl+Q    | Close current file (quits micro if this is the last file open)    |
58 | Ctrl+O    | Open a file (prompts for filename)                                |
59 | Ctrl+S    | Save current file                                                 |
60
61 ### Text operations
62
63 | Key                               | Description of function                   |
64 |---------------------------------  |------------------------------------------ |
65 | AltShiftRightArrow                | Select word right                         |
66 | AltShiftLeftArrow                 | Select word left                          |
67 | ShiftHome or CtrlShiftLeftArrow   | Select to start of current line           |
68 | ShiftEnd or CtrlShiftRightArrow   | Select to end of current line             |
69 | CtrlShiftUpArrow                  | Select to start of file                   |
70 | CtrlShiftDownArrow                | Select to end of file                     |
71 | Ctrl+X                            | Cut selected text                         |
72 | Ctrl+C                            | Copy selected text                        |
73 | Ctrl+V                            | Paste                                     |
74 | Ctrl+K                            | Cut current line                          |
75 | Ctrl+D                            | Duplicate current line                    |
76 | Ctrl+Z                            | Undo                                      |
77 | Ctrl+Y                            | Redo                                      |
78 | AltUpArrow                        | Move current line or selected lines up    |
79 | AltDownArrow                      | Move current line of selected lines down  |
80 | AltBackspace or AltCtrl+H         | Delete word left                          |
81 | Ctrl+A                            | Select all                                |
82
83 ### Macros
84
85 | Key       | Description of function                                                           |
86 |--------   |---------------------------------------------------------------------------------- |
87 | Ctrl+U    | Toggle macro recording (press Ctrl+U to start recording and press again to stop)  |
88 | Ctrl+J    | Run latest recorded macro                                                         |
89
90 ### Multiple cursors
91
92 | Key               | Description of function                                                                       |
93 |----------------   |---------------------------------------------------------------------------------------------- |
94 | Alt+N             | Create new multiple cursor from selection (will select current word if no current selection)  |
95 | Alt+P             | Remove latest multiple cursor                                                                 |
96 | Alt+C             | Remove all multiple cursors (cancel)                                                          |
97 | Alt+X             | Skip multiple cursor selection                                                                |
98 | Ctrl-MouseLeft    | Place a multiple cursor at any location                                                       |
99
100 ### Other
101
102 | Key       | Description of function                                                               |
103 |--------   |-----------------------------------------------------------------------------------    |
104 | Ctrl+G    | Open help file                                                                        |
105 | Ctrl+H    | Backspace (old terminals do not support the backspace key and use Ctrl+H instead)     |
106 | Ctrl+R    | Toggle the line number ruler                                                          |
107
108 ### Emacs style actions
109
110 | Key       | Description of function   |
111 |-------    |-------------------------  |
112 | Alt+F     | Next word                 |
113 | Alt+B     | Previous word             |
114 | Alt+A     | Move to start of line     |
115 | Alt+E     | Move to end of line       |
116
117 ### Function keys.
118
119 Warning! The function keys may not work in all terminals! 
120
121 | Key   | Description of function   |
122 |-----  |-------------------------  |
123 | F1    | Open help                 |
124 | F2    | Save                      |
125 | F3    | Find                      |
126 | F4    | Quit                      |
127 | F7    | Find                      |
128 | F10   | Quit                      |