]> git.lizzy.rs Git - micro.git/blob - runtime/help/options.md
1a413f8b46fafe64d2dc03642590b2405e2d8ae0
[micro.git] / runtime / help / options.md
1 ### Options
2
3 Micro stores all of the user configuration in its configuration directory.
4
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 
7 the config directory.
8
9 Here are the options that you can set:
10
11 * `colorscheme`: loads the colorscheme stored in 
12    $(configDir)/colorschemes/`option`.micro
13    This setting is `global only`.
14
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
18
19         The colorscheme can be selected from all the files in the 
20         ~/.config/micro/colorschemes/ directory. Micro comes by default with three
21         colorschemes:
22
23         * default: this is the default colorscheme.
24
25         * solarized: this is the solarized colorscheme (used in the screenshot). 
26           You should have the solarized color palette in your terminal to use it.
27
28         * solarized-tc: this is the solarized colorscheme for true color, just 
29           make sure your terminal supports true color before using it and that the 
30           MICRO_TRUECOLOR environment variable is set to 1 before starting micro.
31
32         * monokai-tc: this is the monokai colorscheme. It requires true color to
33           look perfect, but the 256 color approximation looks good as well.
34
35         * atom-dark-tc: this colorscheme is based off of Atom's "dark" colorscheme.
36           It requires true color to look good.
37
38
39 * `tabsize`: sets the tab size to `option`
40
41         default value: `4`
42
43 * `indentchar`: sets the indentation character
44
45         default value: ` `
46
47 * `filetype`: sets the filetype for the current buffer. This setting is `local only`
48
49     default value: this will be automatically set depending on the file you have open
50
51 * `ignorecase`: perform case-insensitive searches
52
53         default value: `off`
54
55 * `syntax`: turns syntax on or off
56
57         default value: `on`
58
59 * `tabstospaces`: use spaces instead of tabs
60
61         default value: `off`
62
63 * `autoindent`: when creating a new line use the same indentation as the 
64    previous line
65
66         default value: `on`
67
68 * `cursorline`: highlight the line that the cursor is on in a different color
69    (the color is defined by the colorscheme you are using)
70
71         default value: `off`
72
73 * `ruler`: display line numbers
74
75         default value: `on`
76
77 * `statusline`: display the status line at the bottom of the screen
78
79         default value: `on`
80
81 * `savecursor`: remember where the cursor was last time the file was opened and
82    put it there when you open the file again
83
84         default value: `off`
85
86 * `saveundo`: when this option is on, undo is saved even after you close a file
87    so if you close and reopen a file, you can keep undoing
88
89         default value: `off`
90
91 * `scrollmargin`: amount of lines you would like to see above and below the cursor
92
93         default value: `3`
94
95 * `scrollspeed`: amount of lines to scroll for one scroll event
96
97         default value: `2`
98
99 ---
100
101 Default plugin options:
102
103 * `linter`: lint languages on save (supported languages are C, D, Go, Java,
104    Javascript, Lua). Provided by the `linter` plugin.
105
106         default value: `on`
107
108 * `autoclose`: Automatically close `{}` `()` `[]` `""` `''`. Provided by the autoclose plugin
109
110         default value: `on`
111
112 * `goimports`: Run goimports on save. Provided by the `go` plugin.
113
114         default value: `off`
115
116 * `gofmt`: Run gofmt on save. Provided by the `go` plugin.
117
118         default value: `on`
119
120 Any option you set in the editor will be saved to the file 
121 ~/.config/micro/settings.json so, in effect, your configuration file will be 
122 created for you. If you'd like to take your configuration with you to another
123 machine, simply copy the settings.json to the other machine.
124
125 # Global and local settings
126
127 You can set these settings either globally or locally. Locally means that the setting
128 won't be saved to `~/.config/micro/settings.json` and that it will only be set in
129 the current buffer. Setting an option globally is the default, and will set the option
130 in all buffers.
131
132 The `colorscheme` option is global only, and the `filetype` option is local only. To
133 set an option locally, use `setlocal` instead of `set`.