]> git.lizzy.rs Git - micro.git/blob - runtime/help/defaultkeys.md
Merge
[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 Ctrl+LeftArrow     | Move to the beginning of the current line                                                 |
25 | End or Ctrl+RightArrow     | Move to the end of the current line                                                       |
26 | Alt+LeftArrow              | Move cursor one word left                                                                 |
27 | Alt+RightArrow             | 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 | Ctrl+Home or Ctrl+UpArrow  | Move cursor to start of document                                                          |
33 | Ctrl+End or Ctrl+DownArrow | 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 | Alt+Shift+RightArrow                | Select word right                         |
66 | Alt+Shift+LeftArrow                 | Select word left                          |
67 | Shift+Home or Ctrl+Shift+LeftArrow  | Select to start of current line           |
68 | Shift+End or Ctrl+Shift+RightArrow  | Select to end of current line             |
69 | Ctrl+Shift+UpArrow                  | Select to start of file                   |
70 | Ctrl+Shift+DownArrow                | 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 | Alt+UpArrow                         | Move current line or selected lines up    |
79 | Alt+DownArrow                       | Move current line of selected lines down  |
80 | Alt+Backspace or Alt+Ctrl+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 | Alt+M             | Spawn a new cursor at the beginning of every line in the current selection                    |
99 | Ctrl+MouseLeft    | Place a multiple cursor at any location                                                       |
100
101 ### Other
102
103 | Key       | Description of function                                                               |
104 |---------- |-------------------------------------------------------------------------------------- |
105 | Ctrl+G    | Open help file                                                                        |
106 | Ctrl+H    | Backspace (old terminals do not support the backspace key and use Ctrl+H instead)     |
107 | Ctrl+R    | Toggle the line number ruler                                                          |
108
109 ### Emacs style actions
110
111 | Key       | Description of function   |
112 |---------- |-------------------------- |
113 | Alt+F     | Next word                 |
114 | Alt+B     | Previous word             |
115 | Alt+A     | Move to start of line     |
116 | Alt+E     | Move to end of line       |
117
118 ### Function keys.
119
120 Warning! The function keys may not work in all terminals! 
121
122 | Key   | Description of function   |
123 |------ |-------------------------- |
124 | F1    | Open help                 |
125 | F2    | Save                      |
126 | F3    | Find                      |
127 | F4    | Quit                      |
128 | F7    | Find                      |
129 | F10   | Quit                      |