Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

options.md: Add, sort entries and adjust formatting #3576

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 46 additions & 41 deletions runtime/help/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,16 @@ Here are the available options:

default value: `0`

* `colorscheme`: loads the colorscheme stored in
$(configDir)/colorschemes/`option`.micro, This setting is `global only`.
* `colorscheme`: use the given colorscheme. This setting is `global only`.
The colorscheme can be either one of the colorschemes that micro comes with
by default (such as `default`, `solarized` or `solarized-tc`) which are
embedded in the micro binary, or a custom colorscheme stored in
`~/.config/micro/colorschemes/$(option).micro` where `$(option)` is the
option value. You can read more about micro's colorschemes and see the list
of default colorschemes in `> help colors`.

default value: `default`

Note that the default colorschemes (default, solarized, and solarized-tc)
are not located in configDir, because they are embedded in the micro
binary.

The colorscheme can be selected from all the files in the
~/.config/micro/colorschemes/ directory. Micro comes by default with
three colorschemes:

You can read more about micro's colorschemes in the `colors` help topic
(`help colors`).

* `cursorline`: highlight the line that the cursor is on in a different color
(the color is defined by the colorscheme you are using).

Expand Down Expand Up @@ -201,11 +195,11 @@ Here are the available options:

default value: `false`

* `incsearch`: enable incremental search in "Find" prompt (matching as you type).
* `ignorecase`: perform case-insensitive searches.

default value: `true`

* `ignorecase`: perform case-insensitive searches.
* `incsearch`: enable incremental search in "Find" prompt (matching as you type).

default value: `true`

Expand Down Expand Up @@ -292,17 +286,8 @@ Here are the available options:

default value: `2`

* `paste`: treat characters sent from the terminal in a single chunk as a paste
event rather than a series of manual key presses. If you are pasting using
the terminal keybinding (not `Ctrl-v`, which is micro's default paste
keybinding) then it is a good idea to enable this option during the paste
and disable once the paste is over. See `> help copypaste` for details about
copying and pasting in a terminal environment.

default value: `false`

* `parsecursor`: if enabled, this will cause micro to parse filenames such as
file.txt:10:5 as requesting to open `file.txt` with the cursor at line 10
`file.txt:10:5` as requesting to open `file.txt` with the cursor at line 10
and column 5. The column number can also be dropped to open the file at a
given line and column 0. Note that with this option enabled it is not possible
to open a file such as `file.txt:10:5`, where `:10:5` is part of the filename.
Expand All @@ -311,6 +296,15 @@ Here are the available options:

default value: `false`

* `paste`: treat characters sent from the terminal in a single chunk as a paste
event rather than a series of manual key presses. If you are pasting using
the terminal keybinding (not `Ctrl-v`, which is micro's default paste
keybinding) then it is a good idea to enable this option during the paste
and disable once the paste is over. See `> help copypaste` for details about
copying and pasting in a terminal environment.

default value: `false`

* `permbackup`: this option causes backups (see `backup` option) to be
permanently saved. With permanent backups, micro will not remove backups when
files are closed and will never apply them to existing files. Use this option
Expand All @@ -335,6 +329,12 @@ Here are the available options:

default value: `false`

* `relativeruler`: make line numbers display relatively. If set to true, all
lines except for the line that the cursor is located will display the distance
from the cursor's line.

default value: `false`

* `reload`: controls the reload behavior of the current buffer in case the file
has changed. The available options are `prompt`, `auto` & `disabled`.

Expand All @@ -352,12 +352,6 @@ Here are the available options:

default value: `true`

* `relativeruler`: make line numbers display relatively. If set to true, all
lines except for the line that the cursor is located will display the distance
from the cursor's line.

default value: `false`

* `savecursor`: remember where the cursor was last time the file was opened and
put it there when you open the file again. Information is saved to
`~/.config/micro/buffers/`
Expand Down Expand Up @@ -441,14 +435,14 @@ Here are the available options:

default value: `true`

* `tabmovement`: navigate spaces at the beginning of lines as if they are tabs
(e.g. move over 4 spaces at once). This option only does anything if
`tabstospaces` is on.
* `tabhighlight`: inverts the tab characters' (filename, save indicator, etc)
colors with respect to the tab bar.

default value: `false`

* `tabhighlight`: inverts the tab characters' (filename, save indicator, etc)
colors with respect to the tab bar.
* `tabmovement`: navigate spaces at the beginning of lines as if they are tabs
(e.g. move over 4 spaces at once). This option only does anything if
`tabstospaces` is on.

default value: `false`

Expand Down Expand Up @@ -507,13 +501,13 @@ or disable them:
recent Git commit rather than the diff since opening the file.

Any option you set in the editor will be saved to the file
~/.config/micro/settings.json so, in effect, your configuration file will be
`~/.config/micro/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.
niten94 marked this conversation as resolved.
Show resolved Hide resolved
machine, simply copy the `settings.json` to the other machine.

## Settings.json file

The settings.json file should go in your configuration directory (by default
The `settings.json` file should go in your configuration directory (by default
at `~/.config/micro`), and should contain only options which have been modified
from their default setting. Here is the full list of options in json format,
so that you can see what the formatting should look like.
Expand All @@ -532,18 +526,24 @@ so that you can see what the formatting should look like.
"colorscheme": "default",
"comment": true,
"cursorline": true,
"detectlimit": 100,
"diff": true,
"diffgutter": false,
"divchars": "|-",
"divreverse": true,
"encoding": "utf-8",
"eofnewline": true,
"fakecursor": false,
"fastdirty": false,
"fileformat": "unix",
"filetype": "unknown",
"incsearch": true,
"ftoptions": true,
"helpsplit": "hsplit",
"hlsearch": false,
"hltaberrors": false,
"hltrailingws": false,
"ignorecase": true,
"incsearch": true,
"indentchar": " ",
"infobar": true,
"initlua": true,
Expand All @@ -556,6 +556,8 @@ so that you can see what the formatting should look like.
"matchbracestyle": "underline",
"mkparents": false,
"mouse": true,
"multiopen": "tab",
"pageoverlap": 2,
"parsecursor": false,
"paste": false,
"permbackup": false,
Expand All @@ -565,12 +567,14 @@ so that you can see what the formatting should look like.
"pluginrepos": [],
"readonly": false,
"relativeruler": false,
"reload": "prompt",
"rmtrailingws": false,
"ruler": true,
"savecursor": false,
"savehistory": true,
"saveundo": false,
"scrollbar": false,
"scrollbarchar": "|",
"scrollmargin": 3,
"scrollspeed": 2,
"smartpaste": true,
Expand All @@ -583,12 +587,13 @@ so that you can see what the formatting should look like.
"statusline": true,
"sucmd": "sudo",
"syntax": true,
"tabmovement": false,
"tabhighlight": true,
"tabmovement": false,
"tabreverse": false,
"tabsize": 4,
"tabstospaces": false,
"useprimary": true,
"wordwrap": false,
"xterm": false
}
```
Expand Down
Loading