1editorconfig-format(5)        File Formats Manual       editorconfig-format(5)
2
3
4

NAME

6       editorconfig-format - EditorConfig File Format
7
8

EditorConfig File Format

10       EditorConfig files use an INI format that is compatible with the format
11       used by Python ConfigParser Library, but [ and ] are allowed in the
12       section names. The section names are filepath globs, similar to the
13       format accepted by gitignore. Forward slashes (/) are used as path
14       separators and semicolons (;) or octothorpes (#) are used for comments.
15       Comments should go individual lines. EditorConfig files should be UTF-8
16       encoded, with either CRLF or LF line separators.
17
18       Filename globs containing path separators (/) match filepaths in the
19       same way as the filename globs used by .gitignore files. Backslashes
20       (\) are not allowed as path separators.
21
22       A semicolon character (;) starts a line comment that terminates at the
23       end of the line. Line comments and blank lines are ignored when
24       parsing. Comments may be added to the ends of non-empty lines. An
25       octothorpe character (#) may be used instead of a semicolon to denote
26       the start of a comment.
27

Filename and Location

29       When a filename is given to EditorConfig a search is performed in the
30       directory of the given file and all parent directories for an
31       EditorConfig file (named '.editorconfig' by default). All found
32       EditorConfig files are searched for sections with section names
33       matching the given filename. The search will stop if an EditorConfig
34       file is found with the root property set to true or when reaching the
35       root filesystem directory.
36
37       Files are read top to bottom and the most recent rules found take
38       precedence. If multiple EditorConfig files have matching sections, the
39       rules from the closer EditorConfig file are read last, so properties in
40       closer files take precedence.
41

Wildcard Patterns

43       Section names in EditorConfig files are filename globs that support
44       pattern matching through Unix shell-style wildcards. These filename
45       globs recognize the following as special characters for wildcard
46       matching:
47
48       *            Matches any string of characters, except path separators
49       (/)
50
51       **           Matches any string of characters
52
53       ?            Matches any single character
54
55       [seq]        Matches any single character in seq
56
57       [!seq]       Matches any single character not in seq
58
59       {s1,s2,s3}   Matches any of the strings given (separated by commas, can
60       be nested)
61
62       {num1..num2} Matches any integer numbers between num1 and num2, where
63       num1 and num2 can be either positive or negative
64
65
66
67       The backslash character () can be used to escape a character so it is
68       not interpreted as a special character.
69
70       The maximum length of a section name is 4096 characters. All sections
71       exceeding this limit are ignored.
72

Supported Properties

74       EditorConfig file sections contain properties, which are name-value
75       pairs separated by an equal sign (=). EditorConfig plugins will ignore
76       unrecognized property names and properties with invalid values.
77
78       Here is the list of all property names understood by EditorConfig and
79       all valid values for these properties:
80
81       · indent_style: set to 'tab' or 'space' to use hard tabs or soft tabs
82         respectively. The values are case insensitive.
83       · indent_size: a whole number defining the number of columns used for
84         each indentation level and the width of soft tabs (when supported).
85         If this equals to 'tab', the indent_size will be set to the tab size,
86         which should be tab_width if tab_width is specified, or the tab size
87         set by editor if tab_width is not specified. The values are case
88         insensitive.
89       · tab_width: a whole number defining the number of columns used to
90         represent a tab character. This defaults to the value of indent_size
91         and should not usually need to be specified.
92       · end_of_line: set to 'lf', 'cr', or 'crlf' to control how line breaks
93         are represented. The values are case insensitive.
94       · charset: set to 'latin1', 'utf-8', 'utf-8-bom', 'utf-16be' or
95         'utf-16le' to control the character set. Use of 'utf-8-bom' is
96         discouraged.
97       · trim_trailing_whitespace: set to 'true' to remove any whitespace
98         characters preceeding newline characters and 'false' to ensure it
99         doesn't.
100       · insert_final_newline: set to 'true' ensure file ends with a newline
101         when saving and 'false' to ensure it doesn't.
102       · root: special property that should be specified at the top of the
103         file outside of any sections. Set to 'true' to stop .editorconfig
104         files search on current file. The value is case insensitive.
105       For any property, a value of 'unset' is to remove the effect of that
106       property, even if it has been set before. For example, add 'indent_size
107       = unset' to undefine indent_size property (and use editor default).
108       Property names are case insensitive and all property names are
109       lowercased when parsing. The maximum length of a property name is 50
110       characters and the maximum length of a property value is 255
111       characters. Any property beyond these limits would be ignored.
112
113
114
115EditorConfig                    Tue Jan 28 2020         editorconfig-format(5)
Impressum