Created
June 1, 2012 22:18
-
-
Save acdha/2855465 to your computer and use it in GitHub Desktop.
Use JSHint as the VIM compiler for error checking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CompilerSet makeprg=jshint\ \"%\" | |
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m | |
" vim: set sts=4 sw=4 expandtab ff=unix fdm=syntax : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Set JSHint as compiler. | |
if ! exists('b:current_compiler') | |
compiler jshint | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Paths should normally be
~/.vim/compiler/jshint.vim
and~/.vim/ftplugin/javascript/jshint.vim
Assumes
jshint
is on your path - i.e.npm install -g jshint