2010-03-23 23 views

回答

6

您需要創建一個ctags配置文件並將其放在您的主目錄中。這裏是我用於actionscript的一個(不記得我在哪裏找到它)。查看http://ctags.sourceforge.net/ctags.html並查看langdef,langmap和正則表達式選項以獲取更多信息。

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/ 

此外,如果你使用插件的TList我有這在我的vimcrc

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

我是問,所以我可以用插件的TList自己使用它。 非常感謝。 – 2010-03-26 19:25:35

+1

我發現這個有用的資源:https://gist.github.com/mfwarren/793482 – 2014-07-21 15:38:29