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 * `autoindent`: when creating a new line use the same indentation as the
16 * `autosave`: micro will save the buffer every 8 seconds automatically. Micro
17 also will automatically save and quit when you exit without asking. Be
18 careful when using this feature, because you might accidentally save a file,
19 overwriting what was there before.
21 default value: `false`
23 * `basename`: in the infobar, show only the basename of the file being edited
24 rather than the full path.
26 default value: `false`
28 * `colorcolumn`: if this is not set to 0, it will display a column at the
29 specified column. This is useful if you want column 80 to be highlighted
34 * `colorscheme`: loads the colorscheme stored in
35 $(configDir)/colorschemes/`option`.micro, This setting is `global only`.
37 default value: `default`
39 Note that the default colorschemes (default, solarized, and solarized-tc)
40 are not located in configDir, because they are embedded in the micro binary.
42 The colorscheme can be selected from all the files in the
43 ~/.config/micro/colorschemes/ directory. Micro comes by default with three
46 You can read more about micro's colorschemes in the `colors` help topic
49 * `cursorline`: highlight the line that the cursor is on in a different color
50 (the color is defined by the colorscheme you are using).
54 * `eofnewline`: micro will automatically add a newline to the file.
56 default value: `false`
58 * `fastdirty`: this determines what kind of algorithm micro uses to determine if
59 a buffer is modified or not. When `fastdirty` is on, micro just uses a
60 boolean `modified` that is set to `true` as soon as the user makes an edit.
61 This is fast, but can be inaccurate. If `fastdirty` is off, then micro will
62 hash the current buffer against a hash of the original file (created when the
63 buffer was loaded). This is more accurate but obviously more resource
64 intensive. This option is only for people who really care about having
65 accurate modified status.
69 * `fileformat`: this determines what kind of line endings micro will use for the
70 file. UNIX line endings are just `\n` (lf) whereas dos line endings are
71 `\r\n` (crlf). The two possible values for this option are `unix` and `dos`.
72 The fileformat will be automatically detected and displayed on the statusline
73 but this option is useful if you would like to change the line endings or if
74 you are starting a new file.
78 * `filetype`: sets the filetype for the current buffer. This setting is
81 default value: this will be automatically set depending on the file you have
84 * `ignorecase`: perform case-insensitive searches.
86 default value: `false`
88 * `indentchar`: sets the indentation character.
92 * `infobar`: enables the line at the bottom of the editor where messages are
93 printed. This option is `global only`.
97 * `keepautoindent`: when using autoindent, whitespace is added for you. This
98 option determines if when you move to the next line without any insertions
99 the whitespace that was added should be deleted. By default the autoindent
100 whitespace is deleted if the line was left empty.
102 default value: `false`
104 * `keymenu`: display the nano-style key menu at the bottom of the screen. Note
105 that ToggleKeyMenu is bound to `Alt-g` by default and this is displayed in
106 the statusline. To disable this, simply by `Alt-g` to `UnbindKey`.
108 default value: `false`
110 * `mouse`: whether to enable mouse support. When mouse support is disabled,
111 usually the terminal will be able to access mouse events which can be useful
112 if you want to copy from the terminal instead of from micro (if over ssh for
113 example, because the terminal has access to the local clipboard and micro
116 default value: `true`
118 * `pluginchannels`: contains all the channels micro's plugin manager will search
119 for plugins in. A channel is simply a list of 'repository' json files which
120 contain metadata about the given plugin. See the `Plugin Manager` section of
121 the `plugins` help topic for more information.
123 default value: `https://github.com/micro-editor/plugin-channel`
125 * `pluginrepos`: contains all the 'repositories' micro's plugin manager will
126 search for plugins in. A repository consists of a `repo.json` file which
127 contains metadata for a single plugin.
131 * `rmtrailingws`: micro will automatically trim trailing whitespaces at eol.
133 default value: `false`
135 * `ruler`: display line numbers.
137 default value: `true`
139 * `savecursor`: remember where the cursor was last time the file was opened and
140 put it there when you open the file again.
142 default value: `false`
144 * `savehistory`: remember command history between closing and re-opening
147 default value: `true`
149 * `saveundo`: when this option is on, undo is saved even after you close a file
150 so if you close and reopen a file, you can keep undoing.
152 default value: `false`
154 * `scrollbar`: display a scroll bar
156 default value: `false`
158 * `scrollmargin`: amount of lines you would like to see above and below the
163 * `scrollspeed`: amount of lines to scroll for one scroll event.
167 * `smartpaste`: should micro add leading whitespace when pasting multiple lines?
168 This will attempt to preserve the current indentation level when pasting an
171 default value: `true`
173 * `softwrap`: should micro wrap lines that are too long to fit on the screen.
175 default value: `false`
177 * `splitbottom`: when a horizontal split is created, should it be created below
180 default value: `true`
182 * `splitright`: when a vertical split is created, should it be created to the
183 right of the current split?
185 default value: `true`
187 * `statusline`: display the status line at the bottom of the screen.
189 default value: `true`
191 * `matchbrace`: highlight matching braces for '()', '{}', '[]'
193 default value: `false`
195 * `matchbraceleft`: when matching a closing brace, should matching match the
196 brace directly under the cursor, or the character to the left? only matters
197 if `matchbrace` is true
199 default value: `false`
201 * `syntax`: turns syntax on or off.
203 default value: `true`
205 * `sucmd`: specifies the super user command. On most systems this is "sudo" but
206 on BSD it can be "doas." This option can be customized and is only used when
209 default value: `sudo`
211 * `tabmovement`: navigate spaces at the beginning of lines as if they are tabs
212 (e.g. move over 4 spaces at once). This option only does anything if
213 `tabstospaces` is on.
215 default value: `false`
217 * `tabsize`: sets the tab size to `option`
221 * `tabstospaces`: use spaces instead of tabs
223 default value: `false`
225 * `termtitle`: defines whether or not your terminal's title will be set by micro
228 default value: `false`
230 * `useprimary` (only useful on *nix): defines whether or not micro will use the
231 primary clipboard to copy selections in the background. This does not affect
232 the normal clipboard using Ctrl-C and Ctrl-V.
234 default value: `true`
238 Default plugin options:
240 * `autoclose`: automatically close `{}` `()` `[]` `""` `''`. Provided by the
243 default value: `true`
245 * `ftoptions`: by default, micro will set some options based on the filetype. At
246 the moment, micro will use tabs for makefiles and spaces for python and yaml
247 files regardless of your settings. If you would like to disable this behavior
248 turn this option off.
250 default value: `true`
252 * `linter`: Automatically lint when the file is saved. Provided by the `linter`
255 default value: `true`
257 Any option you set in the editor will be saved to the file
258 ~/.config/micro/settings.json so, in effect, your configuration file will be
259 created for you. If you'd like to take your configuration with you to another
260 machine, simply copy the settings.json to the other machine.
263 ## Global and local settings
265 You can set these settings either globally or locally. Locally means that the
266 setting won't be saved to `~/.config/micro/settings.json` and that it will only
267 be set in the current buffer. Setting an option globally is the default, and
268 will set the option in all buffers.
270 The `colorscheme` option is global only, and the `filetype` option is local
271 only. To set an option locally, use `setlocal` instead of `set`.
273 In the `settings.json` file you can also put set options locally by specifying either
274 a glob or a filetype. Here is an example which has `tabstospaces` on for all files except Go
275 files, and `tabsize` 4 for all files except Ruby files:
280 "tabstospaces": false
285 "tabstospaces": true,
290 Or similarly you can match with globs:
295 "tabstospaces": false
300 "tabstospaces": true,