]> git.lizzy.rs Git - micro.git/blobdiff - runtime/help/keybindings.md
Add identifier.macro color
[micro.git] / runtime / help / keybindings.md
index 463632ab3603d4ec5558b1b9a0c0d11726542ad8..eee3e2fad31757b9314effa8780f6a5f05569879 100644 (file)
@@ -47,6 +47,33 @@ save and quit you can bind it like so:
 }
 ```
 
+## Binding commands
+
+You can also bind a key to execute a command in command mode (see 
+`help commands`). Simply prepend the binding with `command:`. For example:
+
+```json
+{
+    "Alt-p": "command:pwd"
+}
+```
+
+Now when you press `Alt-p` the `pwd` command will be executed which will show
+your working directory in the infobar.
+
+You can also bind an "editable" command with `command-edit:`. This means that 
+micro won't immediately execute the command when you press the binding, but
+instead just place the string in the infobar in command mode. For example, 
+you could rebind `CtrlG` to `> help`:
+
+```json
+{
+    "CtrlG": "command-edit:help "
+}
+```
+
+Now when you press `CtrlG`, `help` will appear in the command bar and your cursor will
+be placed after it (note the space in the json that controls the cursor placement).
 
 ## Binding raw escape sequences
 
@@ -129,6 +156,7 @@ MoveLinesUp
 MoveLinesDown
 DeleteWordRight
 DeleteWordLeft
+SelectLine
 SelectToStartOfLine
 SelectToEndOfLine
 InsertNewline
@@ -159,6 +187,8 @@ Start
 End
 PageUp
 PageDown
+SelectPageUp
+SelectPageDown
 HalfPageUp
 HalfPageDown
 StartOfLine
@@ -183,14 +213,16 @@ HSplit
 PreviousSplit
 ToggleMacro
 PlayMacro
-Suspend (Linux only)
+Suspend (Unix only)
 ScrollUp
 ScrollDown
 SpawnMultiCursor
+SpawnMultiCursorSelect
 RemoveMultiCursor
 RemoveAllMultiCursors
 SkipMultiCursor
 UnbindKey
+JumpToMatchingBrace
 ```
 
 You can also bind some mouse actions (these must be bound to mouse buttons)
@@ -322,6 +354,7 @@ CtrlRightSq
 CtrlCarat
 CtrlUnderscore
 Backspace
+OldBackspace
 Tab
 Esc
 Escape
@@ -435,6 +468,7 @@ MouseWheelRight
 
     // Multiple cursors bindings
     "Alt-n": "SpawnMultiCursor",
+    "Alt-m": "SpawnMultiCursorSelect",
     "Alt-p": "RemoveMultiCursor",
     "Alt-c": "RemoveAllMultiCursors",
     "Alt-x": "SkipMultiCursor",