Use XDG_CONFIG_HOME for configuration directory

Fixes #18
This commit is contained in:
Zachary Yedidia
2016-04-18 10:31:19 -04:00
parent 0ca7ac0c27
commit 8dee0ad2d5
8 changed files with 57 additions and 43 deletions

View File

@@ -111,6 +111,11 @@ to enable word selection, and triple click to enable line selection.
# Configuration
Configuration directory:
Micro uses the `$XDG_CONFIG_HOME/micro` as the configuration directory. As per the XDG spec,
if `$XDG_CONFIG_HOME` is not set, `~/.config/micro` is used as the config directory.
At this point, there isn't much you can configure.
Micro has a few options which you can set:
@@ -122,7 +127,7 @@ To set an option run Ctrl-e to execute a command, and type `set option value`, s
The syntax option can simply be on or off, so for example to turn syntax highlighting off, run `set syntax off`.
The colorscheme can be selected from all the files in the `~/.micro/colorschemes/` directory. Micro comes by default with three colorschemes:
The colorscheme can be selected from all the files in the `ConfigDir/colorschemes/` directory. Micro comes by default with three colorschemes:
* default: this is the default colorscheme.
* solarized: this is the solarized colorscheme (used in the screenshot). You should have the solarized color palette in your terminal to use it.
@@ -130,7 +135,7 @@ The colorscheme can be selected from all the files in the `~/.micro/colorschemes
These are embedded in the Go binary, but to see their source code, look [here](./runtime/colorschemes)
Any option you set in the editor will be saved to the file `~/.micro/settings.json` so, in effect, your configuration file will be created
Any option you set in the editor will be saved to the file `ConfigDir/settings.json` so, in effect, your configuration file will be created
for you. If you'd like to take your configuration with you to another machine, simply copy the `settings.json` to the other machine.
# Contributing