3 Micro stores all of the user configuration in its configuration directory.
5 Micro uses the `$XDG_CONFIG_HOME/micro` as the configuration directory. As per
6 the XDG spec, if `$XDG_CONFIG_HOME` is not set, `~/.config/micro` is used as
9 Here are the options that you can set:
11 * `colorscheme`: loads the colorscheme stored in
12 $(configDir)/colorschemes/`option`.micro
13 This setting is `global only`.
15 default value: `default`
16 Note that the default colorschemes (default, solarized, and solarized-tc)
17 are not located in configDir, because they are embedded in the micro binary
19 The colorscheme can be selected from all the files in the
20 ~/.config/micro/colorschemes/ directory. Micro comes by default with three
23 You can read more about micro's colorschemes in the `colors` help topic
26 * `tabsize`: sets the tab size to `option`
30 * `indentchar`: sets the indentation character
34 * `infobar`: enables the line at the bottom of the editor where messages are printed.
35 This option is `global only`.
39 * `filetype`: sets the filetype for the current buffer. This setting is `local only`
41 default value: this will be automatically set depending on the file you have open
43 * `ignorecase`: perform case-insensitive searches
47 * `syntax`: turns syntax on or off
51 * `tabstospaces`: use spaces instead of tabs
55 * `autoindent`: when creating a new line use the same indentation as the
60 * `cursorline`: highlight the line that the cursor is on in a different color
61 (the color is defined by the colorscheme you are using)
65 * `ruler`: display line numbers
69 * `statusline`: display the status line at the bottom of the screen
73 * `savecursor`: remember where the cursor was last time the file was opened and
74 put it there when you open the file again
78 * `saveundo`: when this option is on, undo is saved even after you close a file
79 so if you close and reopen a file, you can keep undoing
83 * `scrollmargin`: amount of lines you would like to see above and below the cursor
87 * `scrollspeed`: amount of lines to scroll for one scroll event
93 Default plugin options:
95 * `linter`: lint languages on save (supported languages are C, D, Go, Java,
96 Javascript, Lua). Provided by the `linter` plugin.
100 * `autoclose`: Automatically close `{}` `()` `[]` `""` `''`. Provided by the autoclose plugin
104 * `goimports`: Run goimports on save. Provided by the `go` plugin.
108 * `gofmt`: Run gofmt on save. Provided by the `go` plugin.
112 Any option you set in the editor will be saved to the file
113 ~/.config/micro/settings.json so, in effect, your configuration file will be
114 created for you. If you'd like to take your configuration with you to another
115 machine, simply copy the settings.json to the other machine.
117 # Global and local settings
119 You can set these settings either globally or locally. Locally means that the setting
120 won't be saved to `~/.config/micro/settings.json` and that it will only be set in
121 the current buffer. Setting an option globally is the default, and will set the option
124 The `colorscheme` option is global only, and the `filetype` option is local only. To
125 set an option locally, use `setlocal` instead of `set`.
127 In the `settings.json` file you can also put set options locally by specifying a glob.
128 Here is an example which has `tabstospaces` on for all files except Go files, and
129 `tabsize` 4 for all files except Ruby files:
134 "tabstospaces": false
139 "tabstospaces": true,
144 As you can see it is quite easy to set options locally using the `settings.json` file.