Improvements in Vim Prettier manual (#2188)

* Fix incorrect command in Vim Prettier manual

* Make clarification in command description in Vim Prettier manual
master
EddiG 2017-06-18 13:21:44 +05:00 committed by Simon Lydell
parent 58413cde3e
commit 4106a69b6d
1 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ Plug 'sbdchd/neoformat'
Then make Neoformat run on save:
```vim
autocmd BufWritePre *.js Prettier
autocmd BufWritePre *.js Neoformat
```
#### Neoformat - Other `autocmd` events
@ -53,7 +53,7 @@ You can also make Vim format your code more frequently, by setting an `autocmd`
For example, you can format on both of the above events together with `BufWritePre` like this:
```vim
autocmd BufWritePre,TextChanged,InsertLeave *.js Prettier
autocmd BufWritePre,TextChanged,InsertLeave *.js Neoformat
```
See `:help autocmd-events` in Vim for details.
@ -68,7 +68,7 @@ autocmd FileType javascript setlocal formatprg=prettier\ --stdin\ --parser\ flow
let g:neoformat_try_formatprg = 1
```
Each option needs to be escaped with `\`.
Each space in prettier options should be escaped with `\`.
--------------------------------------------------------------------------------