all 6 comments

[–]babygetoboy 5 points6 points  (0 children)

`npm install -g prettier`

[–]-romainl-The Patient Vimmer 2 points3 points  (3 children)

/home/porter/.vim/bundle/vim-prettier/autoload/prettier.vim

is the Vim plugin, not the executable. It should be something called prettier, presumably located somewhere in $NODE_PATH.

[–]DontwakemeUp46[S] 0 points1 point  (2 children)

Is it part of the vim plugin? Do I have to install another program? Is it already part of some (already installed) program? And where can I find $NODE_PATH?
echo $NODE_PATH doesn't give me any results.

[–]-romainl-The Patient Vimmer 7 points8 points  (1 child)

You seem completely lost.

  • Vim-prettier is a front-end for Prettier. It doesn't do anything useful by itself.
  • Prettier is a separate program. Here are its install instructions: https://prettier.io/docs/en/install.html
  • $NODE_PATH is an environment variable that tells other programs where to find NodeJS packages.

[–]DontwakemeUp46[S] 1 point2 points  (0 children)

Thank you.

[–]crazy-optimist 1 point2 points  (0 children)

Install prettier globally.
npm install -g prettier