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