Hi all,
I put together a [CTags.tmbundle][1] for easy double-click installation in recent (cutting edge) TextMate versions. The CTags bundle allows you to quickly look up function definitions, variables etc. It uses the Exuberant CTags program to generate a list of definitions, and presents any match for the current word when invoked.
Allan, if you give me access to the bundle repository I'll gladly submit and maintain this bundle.
Gerd
/bin/bash: line 7: /Users/eric/Library/Application Support/TextMate/ Bundles/CTags.tmbundle/Support/bin/tmctags: No such file or directory
/bin/bash: line 7: exec: /Users/eric/Library/Application Support/ TextMate/Bundles/CTags.tmbundle/Support/bin/tmctags: cannot execute: No such file or directory
;)
Also, why not use F12 as the key? My laptop don't have F14 ;) (unless it does and I'm a moron)
Regards, Eric
On Jun 28, 2006, at 3:03 PM, Gerd Knops wrote:
Gerd
On Jun 28, 2006, at 3:15 PM, Eric Coleman wrote:
/bin/bash: line 7: /Users/eric/Library/Application Support/TextMate/ Bundles/CTags.tmbundle/Support/bin/tmctags: No such file or directory
/bin/bash: line 7: exec: /Users/eric/Library/Application Support/ TextMate/Bundles/CTags.tmbundle/Support/bin/tmctags: cannot execute: No such file or directory
Odd...
Does
/usr/bin/perl -V
in a terminal window work?
;)
Also, why not use F12 as the key? My laptop don't have F14 ;) (unless it does and I'm a moron)
I know. I am not really sure what shortcut to use. But it is easily enough changed, right?
Gerd
Regards, Eric
On Jun 28, 2006, at 3:03 PM, Gerd Knops wrote:
Gerd
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
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@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
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> +<head> +<meta http-equiv="Refresh" content="0; url=txmt://open?url=file:// $file&line=$lno"> +</meta> +<body></body> +</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@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@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
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> +<head> +<meta http-equiv="Refresh" content="0; url=txmt://open?url=file:// $file&line=$lno"> +</meta> +<body></body> +</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@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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Jun 29, 2006, at 2:46 AM, Andreas Wahlin wrote:
Does this have any use at all for a HTML, CSS, JavaScript programmer?
It should work for JavaScript, though only 'stand-alone' JavaScript files and references to them from other files.
Gerd
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> +<head> +<meta http-equiv="Refresh" content="0; url=txmt://open?url=file:// $file&line=$lno"> +</meta> +<body></body> +</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@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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Jun 29, 2006, at 12:23 AM, 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
Good idea, I added an equivalent feature.
Thanks
Gerd
Hi Ged,
When I run this I get this error:
Use of uninitialized value in concatenation (.) or string at /Users/ dave/Library/Application Support/TextMate/Pristine Copy/Bundles/ CTags.tmbundle/Support/bin/tmctags line 45.
but even with this it seems to work.
How does this differ from the ctags in the source bundle?
Dave.
On 29 Jun 2006, at 00:33, 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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Jun 29, 2006, at 2:50 AM, Dave Baldwin wrote:
Hi Ged,
When I run this I get this error:
Use of uninitialized value in concatenation (.) or string at /Users/ dave/Library/Application Support/TextMate/Pristine Copy/Bundles/ CTags.tmbundle/Support/bin/tmctags line 45.
Should be fixed in the latest version.
but even with this it seems to work.
How does this differ from the ctags in the source bundle?
It basically runs ctags for you. The one in the source bundle only could look up from existing tags files.
Gerd
Dave.
On 29 Jun 2006, at 00:33, 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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate