# Tutorial
-This is a brief intro to micro's configuration system that will will give some
-simple examples showing how to configure settings, rebind keys,
+This is a brief intro to micro's configuration system that will give some
+simple examples showing how to configure settings, rebind keys,
and use `init.lua` to configure micro to your liking.
Hopefully you'll find this useful.
+### Plugins
+
+Micro has a plugin manager which can automatically download plugins for you.
+To see the plugins 'official' plugins, go to github.com/micro-editor/plugin-channel.
+
+For example, if you'd like to install the snippets plugin (listed in that repo),
+just press `CtrlE` to execute a command, and type `plugin install snippets`.
+
+For more information about the plugin manager, see the end of the `plugins` help
+topic.
+
### Settings
In micro, your settings are stored in `~/.config/micro/settings.json`, a file
If you need more power than the json files provide, you can use the `init.lua`
file. Create it in `~/.config/micro`. This file is a lua file that is run
-when micro starts and is essential a one-file plugin.
+when micro starts and is essentially a one-file plugin.
I'll show you how to use the `init.lua` file by giving an example of how to
create a binding to `CtrlR` which will execute `go run` on the current file,
function gorun()
local buf = CurView().Buf -- The current buffer
if buf:FileType() == "go" then
- HandleShellCommand("go run " .. buf.Path, true) -- true means don't run it in the background
+ HandleShellCommand("go run " .. buf.Path, true, true) -- the first true means don't run it in the background
end
end