From andreaswahlin@bredband.net Thu Jun 29 07:46:51 2006 From: Andreas Wahlin To: textmate@lists.macromates.com Subject: Re: [TxMt] New bundle: CTags Date: Thu, 29 Jun 2006 09:46:31 +0200 Message-ID: In-Reply-To: <5EB20468-477D-4A6B-8315-8656DA958838@bitmover.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6235727847719262365==" --===============6235727847719262365== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Does this have any use at all for a HTML, CSS, JavaScript programmer? Andreas On Jun 29, 2006, at 7:23 , Oscar Bonilla wrote: > Gerd, > > Thanks for doing this! This is awesome! > > Having said that... I hacked a little patch that makes it jump to > the first tag if it's the only one... it's a little hackish, but > you get the idea > > --- tmctags 2006-06-28 11:41:05.000000000 -0700 > +++ /Users/ob/tmp/tmctags.ob 2006-06-28 22:21:45.000000000 -0700 > @@ -142,7 +142,6 @@ > sub findTags { > my $word=$ENV{'TM_CURRENT_WORD'} or die("Missing 'TM_CURRENT_WORD' > environment!\n"); > > - &pHeader($word); > > my $srch="$word\t"; > my @lines=(); > @@ -170,10 +169,47 @@ > > if(scalar(@lines)==0) > { > + &pHeader($word); > + > print "No tags found.\n"; > } > + elsif(scalar(@lines)==1) > + { > + # redirect straight to the file > + my $line=$lines[0]; > + my $idx1=index($line,"\t/^"); > + my $idx2=rindex($line,"/;\""); > + my $code=substr($line,$idx1+3,$idx2-$idx1-3); > + $line=substr($line,0,$idx1).substr($line,$idx2+3); > + $code=~s/\$$//; > + > + my($w,$file,$type,$lno)=split("\t",$line); > + if($lno=~/line\:(\d+)/) > + { > + $lno=$1; > + } > + else > + { > + $lno=1; > + } > + > + $file=~/(.*)\/(.+)/; > + my $path=$1; > + my $filename=$2; > + print <<"HTML"; > + > + > + > + > + > + > +HTML > + > + } > else > { > + &pHeader($word); > + > my $outLineNo=0; > foreach my $line (@lines) > { > > What do you think? > > > On Jun 28, 2006, at 4:33 PM, Gerd Knops wrote: > >> >> On Jun 28, 2006, at 4:42 PM, Eric Coleman wrote: >> >>> On Jun 28, 2006, at 4:56 PM, Gerd Knops wrote: >>> >>>> Does >>>> >>>> /usr/bin/perl -V >>>> >>>> in a terminal window work? >>> >>> eric(a)calista ~$ /usr/bin/perl -V >>> Summary of my perl5 (revision 5 version 8 subversion 6) >>> configuration: >>> ... >> Thanks. >> >> I updated the bundle: >> >> http://gerd.knops.org/files/CTags.tmbundle.zip >> >> Can you give that a try? >> >> Thanks >> >> Gerd >> >> >> >> _____________________________________________________________________ >> _ >> For new threads USE THIS: textmate(a)lists.macromates.com >> (threading gets destroyed and the universe will collapse if you >> don't) >> http://lists.macromates.com/mailman/listinfo/textmate > > -- > pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1 > > > ______________________________________________________________________ > For new threads USE THIS: textmate(a)lists.macromates.com > (threading gets destroyed and the universe will collapse if you don't) > http://lists.macromates.com/mailman/listinfo/textmate --===============6235727847719262365==--