Auto checking errors for Javascript in VIM using JavascriptLint

I have edited a lot of javascript files in VIM. Checking errors in a lot of javascripts line is such a pain till i found JavasriptLint + VIM Plugin. Let get started, i use Ubuntu Natty 11.04 on this installation.

Updated!
You can fork it on Github :
Davepacheco’s javascriptlint Github

1. Install JavascriptLint


cd ~/
wget -c http://www.javascriptlint.com/download/jsl-0.3.0-src.tar.gz
tar -xvvf jsl-0.3.0-src.tar.gz
cd ~/jsl-0.3.0/src/
make -f Makefile.ref
sudo ln -s ~/jsl-0.3.0/src/Linux_All_DBG.OBJ/jsl /usr/local/bin/jsl

2. Install JavascriptLint.vim

Download from http://www.vim.org/scripts/script.php?script_id=2578.

Or if youre using Vundle / Pathogen, then you can use this github :
http://github.com/joestelmach/javaScriptLint.vim.

Now, every you edit JS files, you will see error syntax checking windows in bottom of your VIM. Great tools!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>