Improvements in Vim Prettier manual (#2188)
* Fix incorrect command in Vim Prettier manual * Make clarification in command description in Vim Prettier manualmaster
parent
58413cde3e
commit
4106a69b6d
|
@ -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 `\`.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue