JSHINT + vim

2 views
Skip to first unread message

AJ ONeal

unread,
May 1, 2012, 7:40:05 PM5/1/12
to UtahJS, Provo HTML5
Every time I save my JS files I get syntax errors reported with error messages in vim!
Sweet!

mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -so ~/.vim/autoload/pathogen.vim \
    https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim

npm install -g jshint

cd ~/.vim/bundle
git clone https://github.com/scrooloose/syntastic.git
And start every file with:

/*jshint laxcomma:true es5:true node:true*/ 

Of course, if you just used CoffeeScript then you wouldn't need to lint your code... it would be caught by the compiler like it should be!
(but I'm not there yet)

AJ ONeal
Reply all
Reply to author
Forward
0 new messages