安装 CoffeeTags 后 Vim Tagbar 为空

Ros*_*mbo 2 vim vimrc

我最难的是让CoffeeTags在 Vim 中运行。

正如网站所暗示的那样,我已经安装了CoffeeTagsgem 并将配置附加到了我的~/.vimrc. 当我打开 Tagbar 时,它是空的。

这是总结问题的屏幕截图:

我错过了什么吗?我正在运行 Ruby 1.9.2、Vim 7.3、CoffeeScript 1.1.3 和 Node.js 0.6.2。和 OS X Lion。

小智 5

CoffeeTags 似乎为我生成了无效的标签文件。每当我尝试在 vim 中使用它生成的标签文件时,我都会得到:

Error detected while processing function <SNR>19_CommandTShowTagFinder:
line    2:
E431: Format error in tags file "tags"
Before byte 156
Press ENTER or type command to continue
Run Code Online (Sandbox Code Playgroud)

最后,我不确定它有多必要。我加了这个:

--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/(^|=[ \t])*class ([A-Za-z.]+)( extends [A-Za-z.]+)?$/\2/c,class/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?@?([A-Za-z.]+):.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?([A-Za-z.]+)[ \t]+=.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*([A-Za-z.]+)[ \t]+=[^->\n]*$/\1/v,variable/
Run Code Online (Sandbox Code Playgroud)

到我的 ~/.ctags 文件,然后只使用常规的 exuberant-ctags 实用程序: find . -iname '*\.coffee*' | ctags -L-