How to get parsing for working with / from vim?

This question has been asked in one form or another about ten times here, and it seems to me that nobody really addresses how to set up the syntax or jslint so that it actually does what it should do (its README file is completely useless)

see here

Can anyone provide some step-by-step instructions or a link to such instructions. I tried installing jslint and spidermonkey and I didn’t get anywhere.


I managed to get the parsing to work (thanks romainl). A few things I learned along the way that can help anyone who has a similar problem.

  • To build a Javascript Lint, look for the README file embedded in jsl-xxx/src/README.html
  • The build gmake -f Makefile.ref , but gmake is the same as make , so enter the command sudo ln -s /usr/bin/make /usr/bin/gmake
  • Now jsl will be found in jsl-0.3.0/src/Linux_All_DBG.OBJ/jsl . To make it public, do something like: ln -s /whatever/jsl-0.3.0/src/Linux_All_DBG.OBJ /home/ForestGump/bin/jsl . More info here
  • To check if jsl really works, find the test file ( here ), then run the jsl -process test.js . It should list all errors.
  • To customize your command line, add it to the vimrc file set statusline=%{SyntasticStatuslineFlag()}
+4
source share
2 answers

What did you do? What works and what doesn't? Are you getting error messages?

Here is what I did:

  • jsl sources from the JavaScript Lint site .
  • Built by jsl and moved it somewhere in my $PATH .
  • Checked if it works by running it in a random .js file.
  • Download and install Syntastic as a Pathogen package.
  • I :helptags /path/to/syntastic/doc , because for some reason the generation of automatic Pathogen tags does not work for me.
  • Read the Syntastic documentation:: :help syntastic .

Steps 1 through 5 did not take more than 3 or 4 minutes, or maybe less.

Step 6 is required, no matter which new tool you try. RTFM

I didn’t need to configure anything next to these three lines in my .vimrc (and I think the third one is superfluous):

 let g:syntastic_auto_loc_list=1 let g:syntastic_disabled_filetypes=['html'] let g:syntastic_enable_signs=1 

and adjust my status line a little:

 %{SyntasticStatuslineFlag()} 

EDIT

Here is my status line:

 set statusline=%<\ %n:%f\ %m%r%y%{SyntasticStatuslineFlag()}%=line:\ %l\ of\ %L,\ col:\ %c%V,\ win:\ %{WindowNumber()}\ 

Do not copy it verbatim or you will get some errors due to a function call at the end. There is a paragraph about this in syntactic help.

End edit

After all this, 10 or 12 minutes, if you think you are reading the documentation, I have a very useful list of locations and signs that appear every time I save a .js file with syntax errors.

+2
source

Set vundle according to README .

Put this in your .vimrc:

 Bundle 'scrooloose/syntastic' 

Then enter this command in vim:

 :BundleInstall 

What is it.

EDIT: Vundle has changed its syntax since I originally wrote this. You are currently using

 Plugin 'scrooloose/syntastic' 

and then enter

 :PluginInstall 
+2
source

All Articles