On 2006-06-05, Mark Palmer <[EMAIL PROTECTED]> wrote:
> A few javascript libraries define functions as a series of associate arrays:
>
> Example
>
> Foo.Bar = Class.create();
> Foo.Bar.prototype = {
> initialize : function( args ) {
> //some code
> },
> execute : function() {
> //some code
> },
> cancel : function() {
> //some code
> }
> }
>
> I can't seem to get ctags to understand this syntax so I can lookup
> these functions in VIM.
>
> Any suggestions?
The ctags javascript module, jscript.c, is only 40 lines total and
all the work seems to be done in a single regular expression. So,
if you have the ctags source code, you could take a look at that
regular expression and fix it to match the structure above, or you
could write your own regular expression for that particular case and
put it in ~/.ctags as
--regex-javascript=/<your pattern here>/\1/
You can find out more from 'man ctags' and from
http://ctags.sourceforge.net/, especially
http://ctags.sourceforge.net/EXTENDING.html.
HTH,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
| Spokane, Washington, USA