Awesome Open Source
Awesome Open Source

vim-prettier

Build Status

Prettier for Vim.

Asynchronous format

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


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
vim-script (1,363
vim (907
prettier (107