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.
8 * `save filename?`: Saves the current buffer. If the filename is provided it
9 will 'save as' the filename.
11 * `replace "search" "value" flags`: This will replace `search` with `value`.
12 The `flags` are optional. At this point, there is only one flag: `-a`, which
13 replaces all occurrences at once.
15 Note that `search` must be a valid regex. If one of the arguments does not
16 have any spaces in it, you may omit the quotes.
18 * `replaceall "search" "value"`: This will replace `search` with `value` without
21 See `replace` command for more information.
23 * `set option value`: sets the option to value. See the `options` help topic for
24 a list of options you can set.
26 * `setlocal option value`: sets the option to value locally (only in the current
29 * `show option`: shows the current value of the given option.
31 * `eval "expression"`: Evaluates a Lua expression. Note that micro will not
32 print anything so you should use `messenger:Message(...)` to display a value.
34 * `run sh-command`: runs the given shell command in the background. The
35 command's output will be displayed in one line when it finishes running.
37 * `bind key action`: creates a keybinding from key to action. See the sections
38 on keybindings above for more info about what keys and actions are available.
40 * `vsplit filename`: opens a vertical split with `filename`. If no filename is
41 provided, a vertical split is opened with an empty buffer.
43 * `hsplit filename`: same as `vsplit` but opens a horizontal split instead of a
46 * `tab filename`: opens the given file in a new tab.
48 * `tabswitch tab`: This command will switch to the specified tab. The `tab` can
49 either be a tab number, or a name of a tab.
51 * `log`: opens a log of all messages and debug statements.
53 * `plugin install plugin_name`: installs the given plugin.
55 * `plugin remove plugin_name`: removes the given plugin.
57 * `plugin list`: lists all installed plugins.
59 * `plugin update`: updates all installed plugins.
61 * `plugin search plugin_name`: searches for the given plugin. Note that you can
62 find a list of all available plugins at
63 github.com/micro-editor/plugin-channel.
65 You can also see more information about the plugin manager in the
66 `Plugin Manager` section of the `plugins` help topic.
68 * `plugin available`: list plugins available for download (this includes any
69 plugins that may be already installed).
71 * `reload`: reloads all runtime files.
73 * `cd path`: Change the working directory to the given `path`.
75 * `pwd`: Print the current working directory.
77 * `open filename`: Open a file in the current buffer.
81 The following commands are provided by the default plugins:
83 * `lint`: Lint the current file for errors.