nice, this works great. thank you very much!!<br><br><div><span class="gmail_quote">On 11/30/05, <b class="gmail_sendername">Charilaos Skiadas</b> <<a href="mailto:cskiadas@uchicago.edu">cskiadas@uchicago.edu</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Nov 30, 2005, at 3:54 PM, Jamal Johnson wrote:<br><br><br>> i've taken a look and to be honest i'm terrible with regexp's and
<br>> could use some help. i'm trying to define a way to see objects in a<br>> certain format in my JS files:<br>><br>> var CustomObject = Class.create();<br>> CustomObject.prototype = Object.extend( (new ViewObject()), {
<br>>     member1 : true,<br>>     member2 : "someString",<br>>     member3 : "anotherString",<br>><br>>     someFunction : function(){<br>>         //doSomething<br>>     },<br>>
<br>>    someOtherFunction : function(){<br>><br>>    }<br>> };<br>><br>> so then in the tmCodeBrowser i'd see something like:<br>>    Objects<br>>       - CustomObject<br>>          - member1<br>
>          - member2<br>>          - member3<br>>          - someFunction<br>>          - someOtherFunction etc....<br>><br>> something along those lines anyway. can one of you point me in a<br>> starting direction for howto setup the .ctags.tmcodebrowser file to
<br>> do this for javascript files?<br>><br><br>Try adding this to .ctags.tmcodebrowser<br><br>--langdef=javascript<br>--langmap=javascript:.js<br>--regex-javascript=/^(.*).prototype *= *(.*)/-\1/o,object/<br>--regex-javascript=/^[ \t]*(.*) *: (([^f]*)|(f[^u]*)|(fu[^n]*))[\t]*
<br>$/---var: \1/o,object/<br>--regex-javascript=/^[ \t]*(.*) *: *function/---fun: \1/o,object/<br><br>This might do something close to what you want. Just make sure to not<br>ask TmCodeBrowser to sort things. With the simple regexp additions,
<br>you cannot recognize things in multiple lines, so there is no way of<br>grouping the variable and function definitions with a particular<br>object, this way at least visually they will be close to what you want.<br><br>
I believe that if one really wants to, one can write a parser and add<br>it to the ctags source code and recompile, that is provided that Gerd<br>Knops provides you the source code, or is willing to add the parser<br>ofr you. I am guessing someone out there has already written a parser
<br>for javascript that maybe does what you want it to better, but I<br>wouldn't know anything about it.<br><br>I was under the impression that tmcodebrowser supported actionscript,<br>which might be close to what you want, but I couldn't find it in
<br>the .ctags.tmcodebrowser format.<br><br>Haris<br><br>
</blockquote></div>