tags:

views:

176

answers:

3

I've been using JSLint, I was wondering if there were any sort of syntax checkers I could use for ECMAScript/JS and possibly other languages so if I do something like :check or :syntaxcheck and it would point out the first or even multiple syntax errors ( which I hopefully don't have ).

+3  A: 

See Running JSLint from your IDE and

:help compiler

as well as jslint.vim.

Sinan Ünür
+3  A: 
:help ft-vim-syntax

You can get it to 'point out' syntax errors by highlighting aggressively. Type the command above to read the docs.

Personally I just have

filetype plugin indent on

in my .vimrc, and 99% of the time I pick up syntax errors immediately because the colour isn't right :)

David Claridge
+2  A: 

This plugin is awesome: http://github.com/scrooloose/syntastic/tree

I don't know how it works standalone, but I highly recommend Scrooloose's vimfiles, which already includes the syntax checker. In ruby for example, it will mark the status line red and tell you in which line you have a syntax error and how many errors are in your source.

Lonecat