Gilles Ruppert

a.k.a. elduderino78

Integrating JSLint for Vim

A couple of months ago I moved away from TextMate and started using vim for most of my text editing needs. I love TextMate, but I needed a powerful text editor that is also available on other operating systems.

Overall I love vim: it has a steep learning curve, but it’s very powerful.If you are touch-typing and loath the mouse as much as I do, it’s fantastic. But I found myself missing out on some of TextMate’s great bundles, and JSLint integration is one of them. After some googling around and looking at different solutions, this is the one that was easiest to install and I like the functionality.

First download & install JavaScript Lint. On OSX & Linux, you can do so by copying the resulting folder into your PATH. I put it in /usr/local/bin/.

Then get the JavaScriptLint vim plugin by Joe Stelmach and restart vim.

Off you go. When you save a JavaScript file in vim, you will get a window with JSLint warnings. If you want to configure JSLint to show/hide certain errors, you can edit the config (jsl.default.conf) in the folder. You might want to backup the file before editing it.

Happy linting!