I'm new to JS & Vim. Which plugins would help me to write Javascript code?
There is a very easy way to integrate JSLint or the community-driven jshint.com (which is much better IMO) with Vim using the Syntastic Vim plugin. See my other post for more info.
There's also a very neat way to add tag-listing using Mozilla's DoctorJS (formerly jsctags), which is also used in Cloud9 IDE's Ace online editor.
apt-get
, Mac's home brew
, etc.):
exuberant-ctags
ctags
actually runs exuberant-ctags
and not the OS's preinstalled ctags
. You can find out by executing ctags --version
.node
(Node.js)DoctorJS
from github: git clone https://github.com/mozilla/doctorjs.git
DoctorJS
dir and make install
(You'll also need the make
app installed, but this is very basic).
make install
doesn't do the trick for the moment. For now I just add the repo's bin/
dir to my $PATH instead. See DoctorJS's GitHub and issues pages for more info.DoctorJS is currently dead. There's a new promising project called tern.js. It's currently in early beta, and should eventually replace it.
There is a project ramitos/jsctags which uses tern as its engine. Just npm install -g
it, and tagbar will automatically use it for javascript files.