editorconfig-format(5)
β¨ NAME β¨
editorconfig-format β the EditorConfig File Format, aka the manual page editorconfig-format(5) from the File Formats Manual π
πΈ EditorConfig File Format πΈ
okay so bestie, EditorConfig files use an INI format that's compatible with the format used by the Python ConfigParser Library β except plot twist, [ and ] are allowed in the section names π
The section names are filepath globs, similar to the format accepted by gitignore. Forward slashes (/) are used as path separators, and semicolons (;) or octothorpes (#) are used for comments. Comments should go on individual lines. EditorConfig files should be UTF-8 encoded, with either CRLF or LF line separators.
Filename globs containing path separators (/) match filepaths in the same way as the filename globs used by .gitignore files. Backslashes (\) are not allowed as path separators, no cap π«
A semicolon character (;) starts a line comment that terminates at the end of the line. Line comments and blank lines are ignored when parsing. Comments may also be added to the ends of non-empty lines. An octothorpe character (#) may be used instead of a semicolon to denote the start of a comment π
π Filename and Location π
When a filename is given to EditorConfig, a search is performed in the directory of the given file and all parent directories for an EditorConfig file (named ".editorconfig" by default). All found EditorConfig files are searched for sections with section names matching the given filename. The search will stop if an EditorConfig file is found with the root property set to true, or when reaching the root filesystem directory π
Files are read top to bottom and the most recent rules found take precedence. If multiple EditorConfig files have matching sections, the rules from the closer EditorConfig file are read last, so properties in closer files take precedence. closest file = main character energy, fr fr π
π¦ Wildcard Patterns π¦
Section names in EditorConfig files are filename globs that support pattern matching through Unix shell-style wildcards. These filename globs recognize the following as special characters for wildcard matching:
*β matches any string of characters, except path separators (/)**β matches any string of characters?β matches any single character[seq]β matches any single character inseq[!seq]β matches any single character not inseq{s1,s2,s3}β matches any of the strings given (separated by commas, can be nested){num1..num2}β matches any integer numbers betweennum1andnum2, wherenum1andnum2can be either positive or negative
The backslash character (\) can be used to escape a character so it is not interpreted as a special character πͺ
The maximum length of a section name is 4096 characters. All sections exceeding this limit are ignored π
π Supported Properties π
EditorConfig file sections contain properties, which are name-value pairs separated by an equal sign (=). EditorConfig plugins will ignore unrecognized property names and properties with invalid values. not me getting silently ignored π
Here is the list of all property names understood by EditorConfig and all valid values for these properties:
indent_styleβ set to"tab"or"space"to use hard tabs or soft tabs respectively. The values are case insensitive.indent_sizeβ a whole number defining the number of columns used for each indentation level and the width of soft tabs (when supported). If this equals to"tab", theindent_sizewill be set to the tab size, which should betab_widthiftab_widthis specified, or the tab size set by editor iftab_widthis not specified. The values are case insensitive.tab_widthβ a whole number defining the number of columns used to represent a tab character. This defaults to the value ofindent_sizeand should not usually need to be specified.end_of_lineβ set to"lf","cr", or"crlf"to control how line breaks are represented. The values are case insensitive.charsetβ set to"latin1","utf-8","utf-8-bom","utf-16be"or"utf-16le"to control the character set. Use of"utf-8-bom"is discouraged.trim_trailing_whitespaceβ set to"true"to remove any whitespace characters preceding newline characters and"false"to ensure it doesn't.insert_final_newlineβ set to"true"to ensure file ends with a newline when saving and"false"to ensure it doesn't.rootβ special property that should be specified at the top of the file outside of any sections. Set to"true"to stop.editorconfigfiles search on current file. The value is case insensitive.
For any property, a value of "unset" is to remove the effect of that property, even if it has been set before. For example, add "indent_size =unset" to undefine indent_size property (and use editor default). it's giving "actually never mind" π
Property names are case insensitive and all property names are lowercased when parsing. The maximum length of a property name is 50 characters and the maximum length of a property value is 255 characters. Any property beyond these limits would be ignored π«
and that's the whole vibe bestie π this was editorconfig-format(5) from the File Formats Manual, brought to you by the EditorConfig project β go forth and indent slay β¨π¦π
π¦ where this page comes from
- arch rolling: editorconfig-core-c 0.12.11-1 Β· BSD-3-Clause
- fedora 43: editorconfig-libs 0.12.11-1.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 43: editorconfig-libs 0.12.11-1.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 43: editorconfig-libs 0.12.9-4.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 43: editorconfig-libs 0.12.9-4.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 44: editorconfig-libs 0.12.10-1.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 44: editorconfig-libs 0.12.10-1.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 44: editorconfig-libs 0.12.11-1.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 44: editorconfig-libs 0.12.11-1.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- nixos 26.05: editorconfig-core-c 0.12.11
- nixpkgs unstable: editorconfig-core-c 0.12.11
- opensuse-leap 16.0: editorconfig 0.12.9-160000.3.1 Β· BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: editorconfig 0.12.9-160000.3.1 Β· BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: editorconfig 0.12.9-160000.3.1 Β· BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: editorconfig 0.12.9-160000.3.1 Β· BSD-2-Clause AND BSD-3-Clause
- ubuntu resolute: editorconfig 0.12.10+~0.17.1-3ubuntu0.1 Β· BSD-2-Clause
- ubuntu stonking: editorconfig 0.12.10+~0.17.1-3ubuntu0.1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms