3 Micro has a plethora of hotkeys that make it easy and powerful to use and all
4 hotkeys are fully customizable to your liking.
5 Custom keybindings are stored internally in micro if changed with the `>bind` command or
6 you can also be added in the file `~/.config/micro/bindings.json` as discussed below.
7 For a list of the default keybindings in the json format used by micro, please see
8 the end of this file. For a more user-friendly list with explanations of what the default
9 hotkeys are and what they do, please see `>help defaultkeys`
11 If `~/.config/micro/bindings.json` does not exist, you can simply create it.
12 Micro will know what to do with it.
14 You can use the alt keys + arrows to move word by word.
15 Ctrl left and right move the cursor to the start and end of the line, and
16 ctrl up and down move the cursor the start and end of the buffer.
18 You can hold shift with all of these movement actions to select while moving.
22 The bindings may be rebound using the `~/.config/micro/bindings.json`
23 file. Each key is bound to an action.
25 For example, to bind `Ctrl-y` to undo and `Ctrl-z` to redo, you could put the
26 following in the `bindings.json` file.
35 In addition to editing your `~/.config/micro/bindings.json`, you can run
36 `>bind <keycombo> <action>` For a list of bindable actions, see below.
38 You can also chain commands when rebinding. For example, if you want Alt-s to save
39 and quit you can bind it like so:
49 It is also possible to disable any of the default key bindings by use of the
50 `UnbindKey` action in the user's `bindings.json` file.
52 # Bindable actions and bindable keys
54 The list of default keybindings contains most of the possible actions and keys
55 which you can use, but not all of them. Here is a full list of both.
57 Full list of possible actions:
137 Here is the list of all possible keys you can bind:
265 # Default keybinding configuration.
270 "Down": "CursorDown",
271 "Right": "CursorRight",
272 "Left": "CursorLeft",
273 "ShiftUp": "SelectUp",
274 "ShiftDown": "SelectDown",
275 "ShiftLeft": "SelectLeft",
276 "ShiftRight": "SelectRight",
277 "AltLeft": "WordLeft",
278 "AltRight": "WordRight",
279 "AltShiftRight": "SelectWordRight",
280 "AltShiftLeft": "SelectWordLeft",
281 "AltUp": "MoveLinesUp",
282 "AltDown": "MoveLinesDown",
283 "CtrlLeft": "StartOfLine",
284 "CtrlRight": "EndOfLine",
285 "CtrlShiftLeft": "SelectToStartOfLine",
286 "ShiftHome": "SelectToStartOfLine",
287 "CtrlShiftRight": "SelectToEndOfLine",
288 "ShiftEnd": "SelectToEndOfLine",
289 "CtrlUp": "CursorStart",
290 "CtrlDown": "CursorEnd",
291 "CtrlShiftUp": "SelectToStart",
292 "CtrlShiftDown": "SelectToEnd",
293 "Enter": "InsertNewline",
294 "Space": "InsertSpace",
295 "CtrlH": "Backspace",
296 "Backspace": "Backspace",
297 "Alt-CtrlH": "DeleteWordLeft",
298 "Alt-Backspace": "DeleteWordLeft",
299 "Tab": "IndentSelection,InsertTab",
300 "Backtab": "OutdentSelection",
305 "CtrlP": "FindPrevious",
311 "CtrlD": "DuplicateLine",
313 "CtrlA": "SelectAll",
315 "Alt,": "PreviousTab",
317 "Home": "StartOfLine",
319 "CtrlHome": "CursorStart",
320 "CtrlEnd": "CursorEnd",
321 "PageUp": "CursorPageUp",
322 "PageDown": "CursorPageDown",
323 "CtrlG": "ToggleHelp",
324 "CtrlR": "ToggleRuler",
327 "CtrlB": "ShellMode",
329 "CtrlE": "CommandMode",
330 "CtrlW": "NextSplit",
331 "CtrlU": "ToggleMacro",
332 "CtrlJ": "PlayMacro",
334 // Emacs-style keybindings
335 "Alt-f": "WordRight",
337 "Alt-a": "StartOfLine",
338 "Alt-e": "EndOfLine",
340 "Alt-n": "CursorDown",
342 // Integration with file managers
354 Note: On some old terminal emulators and on Windows machines, `CtrlH` should be used
357 Additionally, alt keys can be bound by using `Alt-key`. For example `Alt-a`
358 or `Alt-Up`. Micro supports an optional `-` between modifiers like `Alt` and `Ctrl`
359 so `Alt-a` could be rewritten as `Alta` (case matters for alt bindings). This is
360 why in the default keybindings you can see `AltShiftLeft` instead of `Alt-ShiftLeft`
361 (they are equivalent).