vim-prettier
vim-prettier copied to clipboard
Prettier-Eslint-Cli for Vim
vim-prettier
Prettier for Vim.

vim-pritter is a wrapper of Prettier.
Dependencies
vim-prettier use prettier-eslint-cli.
Install prettier-eslint-cli global or local.
Usage
Invoke manually
Open JavaScript file and just execute :Prettier.
That's it.
Automatically format on save
autocmd BufWritePost *.js,*.jsx call prettier#run(1)
Motivation
Pritter official document recommends like followings.
autocmd FileType javascript set formatprg=prettier\ --stdin
set formatprg runs sync and it's too slow.
vim-pritter runs asynchronously and doesn't block cursor moving.
License
New BSD License