如何使 vim ctags 适用于现代 javascript [英] how to make vim ctags works for modern javascript

查看:29
本文介绍了如何使 vim ctags 适用于现代 javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 vim 和 ctags 来获取标签列表.但是对于 javascript,它不适用于这个约定

I am using vim and ctags to get taglist. but for javascript, it does not works for this convention

MyClass.extend({
  xxx: function(){
  },
   ...
})

MyClass.prototype = {
    method : function(){ }

}

MyClass.prototype.method  = function () {
}

推荐答案

就像其他人说的:DoctorJS(以前的 jsctags)是最好的选择.

Like the others had said: DoctorJS (formerly jsctags) is the best option.

但是,通过编写自定义包装器或使用 Vim-taglist-plus 插件将其与 Vim 集成,目前尚无法正常工作,并不是好的解决方案.

However, integrating it with Vim by writing custom wrappers or using Vim-taglist-plus plugin, which isn't currently working, aren't good solutions.

我发现的最简单的方法是安装 TagBar Vim 插件(注意:它是 TagBar,而不是旧的臭名昭著的 TagList!).

The easiest way I've found is to install the TagBar Vim plugin (NOTE: It's TagBar, not the old infamous TagList!).

查看我的其他答案以了解更多信息.

有一个名为 tern.js 的新项目,它应该取代死掉的 Doctor.js.有关详细信息,请参阅上面的链接.

There's a new project called tern.js which should replace the dead doctor.js. See the link above for more info.

这篇关于如何使 vim ctags 适用于现代 javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆