Thread: RE: [Ctags] Adding class methods to the JavaScript support
Brought to you by:
dhiebert
From: David F. <fis...@ia...> - 2004-02-27 14:02:14
|
Sorry to keep replying to myself. It appears uses # comments in my ctags.cnf file was messing it up. ctags.exe: Warning: Ignoring non-option in /ctags.cnf absolute of /etc/ctags.conf = C:/etc/ctags.conf absolute of /ctags.cnf = C:/ctags.cnf absolute of /usr/local/etc/ctags.conf = C:/usr/local/etc/ctags.conf absolute of /ctags.cnf = C:/ctags.cnf absolute of c:\users\fishburn\ctags.cnf = c:\users\fishburn\ctags.cnf absolute of /ctags.cnf = C:/ctags.cnf absolute of /ctags.cnf = C:/ctags.cnf ctags.exe: -f option may not follow a file name Is there anyway to document the extensions you put in that file? Thanks, Dave > -----Original Message----- > From: David Fishburn [mailto:fis...@ia...] > Sent: Friday, February 27, 2004 8:46 AM > To: 'cta...@li...' > Subject: RE: [Ctags] Adding class methods to the JavaScript support > > > > > > --regex-javascript=/(.+)function/\1/I,inner/I > > > > The last character in the regex pattern should be "i", not "I". > > Arrghh, that is my email client capitalizing where it thinks > I should have, I really must turn that off. I have: > -regex-javascript=/(.+)function/\1/I,inner/i > > The last i is for case insensitive search. > Hmmm, still not working, but I will try some more things. > > > Darren, you raised an interesting point. > > > > I have extended the ctags.cnf file as follows: > > > --langdef=javascript > > > --langmap=javascript:.js > > > --regex-javascript=/(.+)function/\1/I,inner/i > > > JavaScript is already a defined language in ctags. There is > > no value redefining this. > > I assumed I had to put that in the ctags.cnf file to indicate > what language the regexp was for. The warnings I have > received all this time was unavoidable (I thought). > > So now I just have 1 line in my ctags.cnf file: > --regex-javascript=/(.+)function/\1/I,inner/i > > Can you think of any other reason this may not be working. > Exuberant Ctags 5.5.2, Copyright (C) 1996-2003 Darren Hiebert > Compiled: Jan 5 2004, 14:50:32 > Addresses: <dhi...@us...>, > http://ctags.sourceforge.net > Optional compiled features: +win32, +regex, +internal-sort > > I can't remember if this is a stock version, or one that I > built. I think this means it is a version I downloaded. > > > Can you use comments in the ctags.cnf file, like this: > # Extenstions for javascript > # To handle lines like: > # this.func_name = function... > --regex-javascript=/(.+)function/\1/g,inner/i > #--regex-javascript=/^(.+)=[ \t]*function/\1/I,inner/i > #--regex-javascript=/^([^.]+\.)?([a-zA-Z0-9_]+)[ \t]*=[ > \t]*function/\2/I,inner/i > > > Thanks, > Dave > > > > > > > -----Original Message----- > > From: da...@dh... > > [mailto:da...@dh...] On Behalf Of Darren Hiebert > > Sent: Friday, February 27, 2004 2:30 AM > > To: David Fishburn > > Cc: cta...@li... > > Subject: RE: [Ctags] Adding class methods to the JavaScript support > > > > > > On Thu, 26 Feb 2004, David Fishburn wrote: > > > > > I have extended the ctags.cnf file as follows: > --langdef=javascript > > > --langmap=javascript:.js > > > > JavaScript is already a defined language in ctags. There is > > no value redefining this. > > > > > --regex-javascript=/(.+)function/\1/I,inner/I > > > > The last character in the regex pattern should be "i", not "I". > > > > > The above expression should have found something, but it > > doesn't, and > > > I have no idea why. > > > > It worked for me with the above correction. > > > > > This line is in the above file: > > > this.displayResult = function( category, product, statistic, > > > from_date, to_date ) { > > > > > > Assuming someone can help me with the above, the real > > expression I am > > > using > > > is: > > > --regex-javascript=/^([^.]+\.)?([a-zA-Z0-9_]+)[ \t]*=[ > > \t]*function/\2/I,inner/I > > > > This pattern also works for me on your example if you correct > > the last character to "i". > > > > > > -- > > Darren Hiebert > > http://DarrenHiebert.com > > http://ctags.sourceforge.net > > > > > |
From: Darren H. <dhi...@us...> - 2004-02-28 05:45:01
|
On Fri, 27 Feb 2004, David Fishburn wrote: > It appears uses # comments in my ctags.cnf file was messing it up. > > ctags.exe: Warning: Ignoring non-option in /ctags.cnf > > absolute of /etc/ctags.conf = C:/etc/ctags.conf > absolute of /ctags.cnf = C:/ctags.cnf > absolute of /usr/local/etc/ctags.conf = C:/usr/local/etc/ctags.conf > absolute of /ctags.cnf = C:/ctags.cnf > absolute of c:\users\fishburn\ctags.cnf = c:\users\fishburn\ctags.cnf > absolute of /ctags.cnf = C:/ctags.cnf > absolute of /ctags.cnf = C:/ctags.cnf > ctags.exe: -f option may not follow a file name > > Is there anyway to document the extensions you put in that file? Not at this time. -- Darren Hiebert http://DarrenHiebert.com http://ctags.sourceforge.net |