我安装了 JSHint:
alex@alex-K43U:~$ which jshint
/home/alex/nvm/v0.8.8/bin/jshint
'/home/alex/.vim/bundle/syntastic'
我在我的.vimrc
:
" Syntastic
let g:syntastic_check_on_open=1
let g:syntastic_javascript_checkers = ['jshint']
let g:syntastic_jshint_exec='/home/alex/nvm/v0.8.8/bin/jshint'
Vim 似乎正在检测它:
Syntastic: active mode enabled
Syntastic info for filetype: javascript
Available checker(s): jshint
Currently enabled checker(s): jshint
但是当我打开一个.js
文件时,我会得到这样的东西:
检查器 javascript/jshint 返回异常状态
并且根本没有错误突出显示。可能是什么问题呢?
(我什.jshintrc
至在我的路径中添加了一个文件home
但没有运气)
编辑:
"~/www/coffeescript/js/script.js" 11L, 193C
syntastic: 8.443991: g:syntastic_version = '3.4.0'
syntastic: 8.455821: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shellslash = 0, &shellt
emp = 1, &shellxquote = ''
syntastic: 8.508374: g:syntastic_aggregate_errors = 0
syntastic: 8.528577: getcwd() = /home/alex
syntastic: 8.567175: CacheErrors: Invoking checker: javascript/jshint
syntastic: 8.625888: SyntasticMake: called with options: {'errorformat': '%E%f: line %l\, col %v\, %m', 'defaults': {'bufnr': 1}, 'makeprg': '/home/alex/nvm/v0
.8.8/bin/jshint --config ~/.jshintrc /home/alex/www/coffeescript/js/script.js', 'returns': [0, 2]}
syntastic: 8.688247: checker output: ['/usr/bin/env: node: No such file or directory', '']
syntastic: 8.707693: raw loclist: [{'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '/usr/bin/env: node: N
o such file or directory'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]