let jshint2_command = '~/path/to/node_modules/.bin/jshint'
歡迎選擇我的課程,讓我們一起見(jiàn)證您的進(jìn)步~~
Is this really the real path of jshint? I don’t know much about it, but if the path is not wrong, try it expand('~/path/to/node_modules/.bin/jshint')
This is the path where JSHint cannot be found. ~/path/to/node_modules
翻譯過(guò)來(lái)就是 ~/路徑/到/node_modules
,意思是你要自己把這個(gè)路徑修改成正確的路徑。。。
先找到你 npm -g install
The installation path.
This command to see if you have modified npm’s prefix configuration:
npm config list | grep ^prefix
If there is no output in this step, then you probably have not modified the configuration and are using the default path. You can see the default path with this command:
npm config list -l | grep ^prefix
prefix = "xxxxx"
這個(gè) xxxxx 就是安裝路徑了。印象中默認(rèn)是 AppDataRoamingnpm
,你自己檢查確認(rèn)下。在里面如果有 jshint 文件夾,你就把 AppDataRoamingnpmjshint.binjshint
這個(gè)路徑在 vimrc 中賦給 jshint_command
.
If you have npm folder but not jshint, then first npm i -g jshint
By the way, ~
是 linux 和 unix 系統(tǒng)默認(rèn)的 User(用戶)文件夾,相當(dāng)于 Windows 的 Users/User/你的名字