本文介绍了推荐用于JavaScript编码的Vim插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是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.


  1. 安装以下软件包使用你最喜欢的包管理器(Ubuntu的 apt-get ,Mac的等):

  1. Install the following packages using your favorite package-manager (Ubuntu's apt-get, Mac's home brew, etc.):

  1. 旺盛-ctags


    • 注意:安装后确保运行 ctags 实际上运行 exuberant-ctags 而不是操作系统的预装 ctags 。您可以通过执行 ctags --version 找到答案。

  1. exuberant-ctags
    • NOTE: After installing make sure running ctags actually runs exuberant-ctags and not the OS's preinstalled ctags. You can find out by executing ctags --version.


  • 克隆 DoctorJS 来自github: git clone https://github.com/mozilla/doctorjs.git

  • 进入内部 DoctorJS dir和 make install (你还需要 make app安装,但这是非常基本的)。


    • 安装插件有一些错误, make install 不能解决问题此时此刻。现在我只需将repo的 bin / dir添加到我的$ PATH中。有关详细信息,请参阅。

    • Clone DoctorJS from github: git clone https://github.com/mozilla/doctorjs.git
    • Go inside 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's bin/ 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插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

  • 09-15 08:35