| 1 | <h2>Comment</h2> |
| 2 | <pre><code># This is a comment |
| 3 | ; And this is too</code></pre> |
| 4 | |
| 5 | <h2>Section Header</h2> |
| 6 | <pre><code>[*] |
| 7 | [*.js] |
| 8 | [*.{bash,sh,zsh}]</code></pre> |
| 9 | |
| 10 | <h2>Key-Value Pair</h2> |
| 11 | <pre><code>key = value |
| 12 | indent_style = space</code></pre> |
| 13 | |
| 14 | <h2>Full example</h2> |
| 15 | <pre><code># EditorConfig is awesome: https://EditorConfig.org |
| 16 | |
| 17 | # top-most EditorConfig file |
| 18 | root = true |
| 19 | |
| 20 | # Unix-style newlines with a newline ending every file |
| 21 | [*] |
| 22 | end_of_line = lf |
| 23 | insert_final_newline = true |
| 24 | |
| 25 | # Matches multiple files with brace expansion notation |
| 26 | # Set default charset |
| 27 | [*.{js,py}] |
| 28 | charset = utf-8 |
| 29 | |
| 30 | # 4 space indentation |
| 31 | [*.py] |
| 32 | indent_style = space |
| 33 | indent_size = 4 |
| 34 | |
| 35 | # Tab indentation (no size specified) |
| 36 | [Makefile] |
| 37 | indent_style = tab |
| 38 | |
| 39 | # Indentation override for all JS under lib directory |
| 40 | [lib/**.js] |
| 41 | indent_style = space |
| 42 | indent_size = 2 |
| 43 | |
| 44 | # Matches the exact files either package.json or .travis.yml |
| 45 | [{package.json,.travis.yml}] |
| 46 | indent_style = space |
| 47 | indent_size = 2</code></pre> |