Skip to content

Instantly share code, notes, and snippets.

@acdha
Created June 1, 2012 22:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save acdha/2855465 to your computer and use it in GitHub Desktop.
Save acdha/2855465 to your computer and use it in GitHub Desktop.
Use JSHint as the VIM compiler for error checking
CompilerSet makeprg=jshint\ \"%\"
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m
" vim: set sts=4 sw=4 expandtab ff=unix fdm=syntax :
" Set JSHint as compiler.
if ! exists('b:current_compiler')
compiler jshint
endif
@acdha
Copy link
Author

acdha commented Jun 1, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment