vim-prettier
vim-prettier copied to clipboard
Auto save only runs with @format or @prettier tag in multi-line /* comments not // single-line comment
Do you want to request a feature or report a bug? Bug?
What is the current/expected behavior? Run on save
What version of vim-prettier
are you using - (output of :PrettierVersion
) ?
1.0.0-beta
What version of prettier
are you using - (output of :PrettierCliVersion
) ?
1.19.1
What is your prettier
executable path - (output of :PrettierCliPath
) ?
*/node_modules/.bin/prettier
Did this work in previous versions of vim-prettier and/or prettier ? Don't know
Hello, great plugin! I've just installed it and can run it manually with :Prettier
, or automatically on save if I use the @format
or @prettier
tags in a multi-line comment, like so:
/**
* @format
*/
Unfortunately, it won't run on save if it's in a single-line comment.
// @format
I'm using vim-pathogen, so I installed like so:
$ cd ~/.vim/bundle
$ git clone https://github.com/prettier/vim-prettier
$ cd vim-prettier
$ yarn install
Added this line to my ~/.vimrc:
let g:prettier#autoformat = 1
Then, in my NodeJS project directory:
$ yarn add -D prettier/vim-prettier
Have I missed something? Thanks in advance!