jshint in VIM
I was requested to provide the same configuration for jshint in VIM as I provided for Sublime Text 3, so lets do it! ;)
- Hopefully you have
pathogen.vim
installed, if not Click here and go through all steps - Go to the bundle directory (
~/.vim/bundle/
) and get the repo from git:git clone https://github.com/scrooloose/syntastic.git
- Restart vim and fire
:Helptags
command. If you get any errors, try to check if you have installed pathogen correctly. - Open a javascript file and fire command:
:SyntasticInfo
. If you have any jshint or jslint installed, you should see something similar to this:
Syntastic: active mode enabled
Syntastic info for filetype: javascript
Available checker(s): jshint
Currently enabled checker(s): jshint
If you have no checkers, then you probably don't have jshint installed. Try install jshint globally, for example using npm:
npm install -g jshint
and restarting VIM
- If everything went well and if any error appears, you should see two arrows on the left, just near the line number: and at the bottom of VIM you should see what the error is about:
Expected '(' to have an indentation at 1 instead at 3.
Now you can enjoy your jshint in VIM ;)
Written by Mateusz Gachowski
Related protips
1 Response
Well done Mateusz! Thanks for the tip!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#