Skip to content

Commit 288a827

Browse files
Update editor-config.md
1 parent 5015e12 commit 288a827

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

recipes/format-and-lint/editor-config.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,29 @@ If using VS Code Prettier or related extensions (such as for formatting with sem
2020

2121
These are separate but can combined if they make sense for one project.
2222

23+
24+
## General format
25+
26+
```ini
27+
root = true
28+
29+
[*]
30+
foo = bar
31+
32+
[*.foo]
33+
foo = bar
34+
35+
[*.{buzz,bazz}]
36+
foo = bar
37+
```
38+
39+
Some people like to put this at the top of the file:
40+
41+
```ini
42+
# editorconfig.org
43+
```
44+
45+
2346
### Shell
2447

2548
```ini
@@ -74,20 +97,17 @@ indent_size = 4
7497
### HTML
7598

7699
```ini
77-
# editorconfig.org
78-
79-
root = true
80-
81100
[*]
82101
charset = utf-8
83-
indent_size = 2
102+
indent_size = 4
84103
indent_style = space
85104
insert_final_newline = true
86105
trim_trailing_whitespace = true
87106
```
88-
For Jekyll markdown support, add this:
89107

90-
```init
108+
For Jekyll markdown support, add this. But only if you use the double space at the end of a line to signify a line break.
109+
110+
```ini
91111
[*.md]
92112
trim_trailing_whitespace = false
93113
```

0 commit comments

Comments
 (0)