Skip to content

Commit 5e6cca2

Browse files
authored
Merge pull request #315 from aaronArinder/readme-updated-with-autosave-config
readme: example config: autoformat on save without pragma
2 parents b146fda + a41f8de commit 5e6cca2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ Allow auto formatting for files without "@format" or "@prettier" tag
176176
let g:prettier#autoformat_require_pragma = 0
177177
```
178178

179+
**NOTE** The previous two options can be used together for autoformatting files on save without `@format` or `@prettier` tags
180+
181+
```vim
182+
let g:prettier#autoformat = 1
183+
let g:prettier#autoformat_require_pragma = 0
184+
```
185+
179186
Toggle the `g:prettier#autoformat` setting based on whether a config file can be found in the current directory or any parent directory. Note that this will override the `g:prettier#autoformat` setting!
180187

181188
```vim

0 commit comments

Comments
 (0)