问题描述
我是JS&的新手Vim的。哪些插件可以帮我编写Javascript代码?
I'm new to JS & Vim. Which plugins would help me to write Javascript code?
推荐答案
语法检查/ Linting
有一种非常简单的方法可以集成JSLint或社区驱动的(这样更好IMO)与Vim使用Syntastic Vim插件。有关详细信息,请参见。
Syntax Checking / Linting
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.
使用Mozilla的 DoctorJS 添加标签列表也非常简洁(以前的 jsctags ),也用于的。
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.
- 安装以下软件包使用你最喜欢的包管理器(Ubuntu的
apt-get
,Mac的等):
- Install the following packages using your favorite package-manager (Ubuntu's
apt-get
, Mac's homebrew
, etc.):
-
旺盛-ctags
- 注意:安装后确保运行
ctags
实际上运行exuberant-ctags
而不是操作系统的预装ctags
。您可以通过执行ctags --version
找到答案。
- 注意:安装后确保运行
exuberant-ctags
- NOTE: After installing make sure running
ctags
actually runsexuberant-ctags
and not the OS's preinstalledctags
. You can find out by executingctags --version
.
- NOTE: After installing make sure running
DoctorJS
来自github: git clone https://github.com/mozilla/doctorjs.git
DoctorJS
dir和 make install
(你还需要 make
app安装,但这是非常基本的)。 - 安装插件有一些错误,
make install
不能解决问题此时此刻。现在我只需将repo的bin /
dir添加到我的$ PATH中。有关详细信息,请参阅。
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).- There're some bugs with installing the plugin,
make install
doesn't do the trick for the moment. For now I just add the repo'sbin/
dir to my $PATH instead. See DoctorJS's GitHub and issues pages for more info.
新项目 - Tern.js
。有一个名为的新项目。它目前处于测试阶段,最终应该替换它。
New Project - Tern.js
DoctorJS is currently dead. There's a new promising project called tern.js. It's currently in early beta, and should eventually replace it.
有一个项目。只需 npm install -g
它,标签栏会自动将其用于javascript文件。
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.
这篇关于推荐用于JavaScript编码的Vim插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!