vim-autoformat / vim-autoformat

Provide easy code formatting in Vim by integrating existing code formatters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to set g:formatterpath

xyecoding opened this issue · comments

commented

I installed remark locally with the command npm install -g remark-cli in folder, ~/.vim_runtime/vimrcs/auto-format.
Then, I added let g:formatterpath = ['~/.vim_runtime/vimrcs/auto-format'] to the .vimrc. However, It did not work with markdown file.
I tried to add let g:formatterpath = ['~/.vim_runtime/vimrcs/auto-format/node_modules'] in my .vimrc. It also did not work. So, what should I set with g:formatterpath.

What is the location in which the executable resides?
If there is no single executable called remark, then you have to specify a custom formatter command yourself.

You can look here for the default definition

https://github.com/vim-autoformat/vim-autoformat/blob/master/plugin/defaults.vim#L573