开发者

How can I generate a TAGS file for Groovy classes for use in VIM/Emacs

Exuberant cTags doesn't support Groo开发者_运维技巧vy.


You need to create a ctags config file and put it in your home directory. Here is one that I use for actionscript(don't remember where I found it). Look at http://ctags.sourceforge.net/ctags.html and see langdef, langmap, and regex options for more info.

ctags.cnf

--langdef=actionscript
--langmap=actionscript:.as
--regex-actionscript=/^[ \t]*[(private|public) ( \t)]*function[ \t]+([A-Za-z0-9_]+)[ \t]*\(/\1/f,function,functions/
--regex-actionscript=/^[ \t]*public function (set|get)[ \t]+([A-Za-z0-9_]+)[ \t]*\(/\1 \2/p,property,properties/
--regex-actionscript=/^[ \t]*private var[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/v,private,private variables/
--regex-actionscript=/^[ \t]*public var[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/u,public,public variables/
--regex-actionscript=/.*\.prototype \.([A-Za-z0-9 ]+)=([ \t]?)function( [ \t]?)*\(/\1/f,prototype,prototype functions/
--regex-actionscript=/^[ \t]*class[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/c,class,classes/

Also if you use the TList Plugin I have this in my vimcrc

let tlist_actionscript_settings = 'actionscript;c:class;f:method;p:property;v:private variables;x:variables;u:public variables'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜