Improve vim integration section (#416)

master
Riley Tomasek 2017-01-23 10:27:52 -05:00 committed by James Long
parent 62f15f51ce
commit 515379435c
1 changed files with 6 additions and 1 deletions

View File

@ -173,7 +173,12 @@ autocmd FileType javascript set formatprg=prettier\ --stdin
```
This makes Prettier power the [`gq` command](http://vimdoc.sourceforge.net/htmldoc/change.html#gq)
for automatic formatting without any plugins.
for automatic formatting without any plugins. You can also add the following to your
`.vimrc` to run prettier when `.js` files are saved:
```
autocmd BufWritePre *.js :normal gggqG
```
### Visual Studio Code