VIM + JSLint?

前端 未结 6 2083
花落未央
花落未央 2020-11-28 16:56

I spend my days in vim, currently writing a lot of JavaScript. I\'ve been trying to find a way to integrate JSLint or something similar into vim to improve my coding. Has an

6条回答
  •  孤城傲影
    2020-11-28 17:59

    Here are the Mac OS instructions updated for Nov. 2012. Assumes you have Homebrew installed in order to get Node.js, and that you've already installed Syntastic for Vim (I use https://github.com/carlhuda/janus which provides this automatically):

    $ brew install node.js
    $ npm install -g jshint
    

    Then add '/usr/local/share/npm/bin' to your PATH (probably in ~/.bashrc). For example, add the line: export PATH="$PATH:/usr/local/share/npm/bin"

    restart your Terminal and check that

    $ jshint

    is executable from the command line. Syntastic will discover jsHint automatically. Restart MacVim and enjoy!

提交回复
热议问题