]> git.lizzy.rs Git - micro.git/blob - runtime/help/commands.md
31f64cc08027c5090d6caa103bafed3811e7679a
[micro.git] / runtime / help / commands.md
1 # Possible commands
2
3 You can execute an editor command by pressing `Ctrl-e` followed by the command.
4 Here are the possible commands that you can use.
5
6 * `quit`: Quits micro.
7
8 * `save`: Saves the current buffer.
9
10 * `replace "search" "value" flags`: This will replace `search` with `value`. 
11    The `flags` are optional.
12    At this point, there is only one flag: `c`, which enables `check` mode 
13    which asks if you'd like to perform the replacement each time
14
15    Note that `search` must be a valid regex.  If one of the arguments
16    does not have any spaces in it, you may omit the quotes.
17
18 * `set option value`: sets the option to value. See the `options` help topic
19    for a list of options you can set.
20
21 * `setlocal option value`: sets the option to value locally (only in the current
22    buffer).
23
24 * `run sh-command`: runs the given shell command in the background. The 
25    command's output will be displayed in one line when it finishes running.
26
27 * `bind key action`: creates a keybinding from key to action. See the sections on
28    keybindings above for more info about what keys and actions are available.
29
30 * `vsplit filename`: opens a vertical split with `filename`. If no filename is
31    provided, a vertical split is opened with an empty buffer
32
33 * `hsplit filename`: same as `vsplit` but opens a horizontal split instead of
34    a vertical split
35
36 * `tab filename`: opens the given file in a new tab.
37
38 ---
39
40 The following commands are provided by the default plugins:
41
42 * `lint`: Lint the current file for errors.
43
44 * `gofmt`: Run gofmt on the current file.
45
46 * `goimports`: Run goimports on the current file.