mirror of
https://github.com/zyedidia/micro
synced 2024-11-05 17:41:24 +00:00
Some documentation
This commit is contained in:
parent
05331e1fa2
commit
e66d01e989
3 changed files with 32 additions and 9 deletions
File diff suppressed because one or more lines are too long
|
@ -45,6 +45,11 @@ Here are the possible commands that you can use.
|
|||
|
||||
* `tabswitch tab`: This command will switch to the specified tab. The `tab` can
|
||||
either be a tab number, or a name of a tab.
|
||||
|
||||
* `textfilter sh-command`: filters the current selection through a shell command
|
||||
as standard input and replaces the selection with the stdout of the shell command.
|
||||
For example, to sort a list of numbers, first select them, and then execute
|
||||
`> textfilter sort -n`.
|
||||
|
||||
* `log`: opens a log of all messages and debug statements.
|
||||
|
||||
|
|
|
@ -47,6 +47,21 @@ save and quit you can bind it like so:
|
|||
}
|
||||
```
|
||||
|
||||
Each action will return a success flag. Actions can be chained such that
|
||||
the chain only continues when there are successes, or failures, or either.
|
||||
The `,` separator will always chain to the next action. The `|` separator
|
||||
will abort the chain if the action preceding it succeeds, and the `&` will
|
||||
abort the chain if the action preceding it fails. For example, in the default
|
||||
bindings, tab is bound as
|
||||
|
||||
```
|
||||
"Tab": "Autocomplete|IndentSelection|InsertTab"
|
||||
```
|
||||
|
||||
This means that if the `Autocomplete` action is successful, the chain will abort.
|
||||
Otherwise, it will try `IndentSelection`, and if that fails too, it will
|
||||
execute `InsertTab`.
|
||||
|
||||
## Binding commands
|
||||
|
||||
You can also bind a key to execute a command in command mode (see
|
||||
|
@ -221,6 +236,7 @@ RemoveAllMultiCursors
|
|||
SkipMultiCursor
|
||||
None
|
||||
JumpToMatchingBrace
|
||||
Autocomplete
|
||||
```
|
||||
|
||||
You can also bind some mouse actions (these must be bound to mouse buttons)
|
||||
|
@ -407,8 +423,8 @@ MouseWheelRight
|
|||
"Backspace": "Backspace",
|
||||
"Alt-CtrlH": "DeleteWordLeft",
|
||||
"Alt-Backspace": "DeleteWordLeft",
|
||||
"Tab": "IndentSelection,InsertTab",
|
||||
"Backtab": "OutdentSelection,OutdentLine",
|
||||
"Tab": "Autocomplete|IndentSelection|InsertTab",
|
||||
"Backtab": "OutdentSelection|OutdentLine",
|
||||
"CtrlO": "OpenFile",
|
||||
"CtrlS": "Save",
|
||||
"CtrlF": "Find",
|
||||
|
@ -431,9 +447,12 @@ MouseWheelRight
|
|||
"CtrlEnd": "CursorEnd",
|
||||
"PageUp": "CursorPageUp",
|
||||
"PageDown": "CursorPageDown",
|
||||
"CtrlPageUp": "PreviousTab",
|
||||
"CtrlPageDown": "NextTab",
|
||||
"CtrlG": "ToggleHelp",
|
||||
"Alt-g": "ToggleKeyMenu",
|
||||
"CtrlR": "ToggleRuler",
|
||||
"CtrlL": "JumpLine",
|
||||
"CtrlL": "command-edit:goto ",
|
||||
"Delete": "Delete",
|
||||
"CtrlB": "ShellMode",
|
||||
"CtrlQ": "Quit",
|
||||
|
@ -441,6 +460,7 @@ MouseWheelRight
|
|||
"CtrlW": "NextSplit",
|
||||
"CtrlU": "ToggleMacro",
|
||||
"CtrlJ": "PlayMacro",
|
||||
"Insert": "ToggleOverwriteMode",
|
||||
|
||||
// Emacs-style keybindings
|
||||
"Alt-f": "WordRight",
|
||||
|
@ -449,7 +469,6 @@ MouseWheelRight
|
|||
"Alt-e": "EndOfLine",
|
||||
|
||||
// Integration with file managers
|
||||
"F1": "ToggleHelp",
|
||||
"F2": "Save",
|
||||
"F3": "Find",
|
||||
"F4": "Quit",
|
||||
|
@ -464,12 +483,11 @@ MouseWheelRight
|
|||
"MouseMiddle": "PastePrimary",
|
||||
"Ctrl-MouseLeft": "MouseMultiCursor",
|
||||
|
||||
// Multiple cursors bindings
|
||||
"Alt-n": "SpawnMultiCursor",
|
||||
"Alt-m": "SpawnMultiCursorSelect",
|
||||
"Alt-p": "RemoveMultiCursor",
|
||||
"Alt-c": "RemoveAllMultiCursors",
|
||||
"Alt-x": "SkipMultiCursor",
|
||||
"Alt-x": "SkipMultiCursor"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue