Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

EditorConfig

Mitos reads .editorconfig files by default. Use them to share file conventions with other editors, or apply settings to paths rather than entire languages.

For example, save this as .editorconfig in a project:

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = 80
spelling_language = en_US

Mitos reads matching sections from the file’s directory and its parents. Closer files override settings from higher directories; later matching sections in a file override earlier ones. root = true stops the search for parent configuration. Use unset to remove an inherited property.

Supported properties

PropertyValues and behavior
indent_stylespace or tab
indent_sizeNumber of spaces, or tab to use tab_width; indentation is limited to 1–16 columns
tab_widthWidth used to display tabs
end_of_linelf or crlf; cr also works in builds with Unicode line endings
charsetutf-8, latin1, utf-16le, or utf-16be; utf-8-bom is ignored
insert_final_newlinetrue or false
trim_trailing_whitespacetrue or false
max_line_lengthPositive integer; sets the text width used for reflow and optional wrapping
spelling_languageA dictionary name, such as en_US; see Spell checking

The last two properties are extensions to the standard EditorConfig properties. Unknown properties are ignored.

Precedence

Matching EditorConfig settings take precedence over language and editor defaults for indentation, line endings, encoding on open, save cleanup, and text width. Where a property is absent, Mitos uses its usual defaults and file detection. An explicit :set-spelling-language choice overrides spelling_language for that buffer.

To ignore EditorConfig files, add this to config.toml:

[editor.files]
editor-config = false

See Languages for settings specific to a language and Configure Mitos for your own preferences.