How do you substitute one set of TM icons with another? All I've ever
done is copy-paste from the get info window, but this is on a per-file
basis.
--
Ben Jackson
Diretor de Desenvolvimento
INCOMUM Design & Conceito
+55 (21) 9127-2819
ben(a)incomumdesign.com
http://www.incomumdesign.com
Up to this point I've been doing macros the dummy way, recording actions
and saving them, etc... however I'd like to get a little more control
and get access to things like cursor position, etc, that recording isn't
going to give me. Is there a macro API? I haven't found any references
to one in the docs.
--
Ben Jackson
Diretor de Desenvolvimento
INCOMUM Design & Conceito
+55 (21) 9127-2819
ben(a)incomumdesign.com
http://www.incomumdesign.com
I have a variable "myPackage" in my template. I would like to replace
that with the directory of the template.
For example if I created a file at
/project/include/com/kidbombay/Myfile.as
I would like to replace all instances of myPackage in my template with
"com.kidbombay"
Basically the steps are
1. Is the file located inside a "include" directory? If yes continue.
2. Parse all folders down from the include level.
"include/com/client/project" would return "com/client/project"
3. Replace the slashes with dots. "com/client/project" becomes
com.client.project.
4. Replaces all instances of myPackage in my template with
"com.client.project"
How would I do this? I am not very familiar with perl.
Thanks!
I'm really digging into snippets (and loving them, by the way). One
question though, I see $0s used in places and I'm not sure what it
does. Could someone explain it to me? Thanks.
James Edward Gray II
I have tried downloading b5 twice. Once from the prompt inside tm b4
and once from the website and both times the dmg has reported that it
was not mountable...
never had a problem like this before so I am at a loss as to wether it
is something on my end.
Thanks,
Eric C
Hi folks,
Is it me or is the Edit in Textmate service broken in b5? Text acts
like it gets cut and immediately pasted.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Boy, you give us a little HTML and some of us want more. Here are two
ideas for the HTML Output. Version 3.0? anyway, here they are...
1. Let txmt:// handle commands/snippets/etc and send them to existing
windows. I don't know how hard that would be.
2. Somehow let commands process the results of an HTML form. Not
100% sure how this could work, but I'm imagining being able to set
form action=txmt://...
The upshot of #1 is that you would have a mini-Dashboard in TM.
People could hack out command palettes of all kinds. #2 would add
even more flexibility.
These brainstorms are the result of me wanting floating command
palettes and trying to think of a good interface for my 'Edit
Filenames in TM' contextual menu...
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Because of the Text -> Convert -> to Titlecase key binding (option+u),
I can no longer (easily) insert characters with umlauts (ü, ï, etc.).
Is there a workaround/clever solution/cunning plan to deal with this?
Rich Barton
I don't know if this has been aswered or not, but is it possible to set
multiple folding starts and stops in a syntax file? Like can I edit the
Java syntax to fold { } *and* /** */?
Jonathan Raphaelson
University of Colorado at Boulder
--
Home: 303-469-3442
Cell: 720-937-4372
jonathan.raphaelson(a)colorado.edu
jonraphaelson(a)gmail.com
Just downloaded TextMate today after searching high and low for a text
editor for OS X that has folding. I didn't realize it was a such a
sought-after but generally unavailable feature. I've been hand-coding
in Dreamweaver, which i like for its auto-complete and hints, but
beyond that I haven't really had much luck marrying HTML and PHP in its
framework.
Anyway, to my questions, and thanks for bearing with me as I explore
Text Mate, which looks great. If it's as good as I think it's going to
be, I'll gladly pony up cash for TM.
As far as I can tell, Text Mate won't "remember" code blocks that
you've marked for folding unless you change something in the plist
files with the respective syntax bundles. Yes? (I was surprised that
I could fold up lots of code, save the file, and then lose all of my
foldings when I reoped the file. At first I thought this was because I
hadn't put the file into a project and saved the whole project.)
Anyway, I basically have no idea what I'm doing. Is there some easy
way of specifying the the opening and closing expressions for folding?
Does this require that you have a good understanding of regular
expressions?
I started out viewing my code with HTML (PHP) syntax, which
automatically recognizes some tag structures. When I switched to PHP
syntax, which I like better, it doesn't seem to recognize anything at
all. How does one add or modify the plist information so that TM will
"remember" that I folded blocks such as:
<?php
...
?>
or even
<form>
...
</form>
?
Thanks for any help you can provide. Sorry to be so verbose.
Chas
If a Latex document is split into multiple files, the "to PDF" command
(as advertised on the blog), generates an error. It worked beautifully
previously (B4) - please could this be fixed in the next beta.
Also, there are now two latex bundles (LaTeX and Latex), which is the
most up-to-date?
Thanks,
Tim
Ok,
Possibly very obvious, ...but I can't figure out what key (screenshot
attached) this shortcut refers to.
I'm using a Powerbook. Does everyone know this but me?
Thanks,
Vic
I have a number of Commands to insert some text into the document, but
all of them have a couple of 'side-effects' that I don't want.
1. The inserted text is always selected, and I would prefer it to not
be selected.
2. There is always a New line character behind the input, whereas I
would just want the cursor to remain immediately behind the inserted
text on the same line.
What is it that I'm missing or doing wrong ?? Any help would be
gratefully received.
Command Examples:
INSERT DATE:
Save: Nothing
Command: echo `date +%Y-%m-%d`
Input: None
Output: Tried all versions ( Insert as Snippet / Replace Selected text
/ etc )
INSERT PATH2FILE:
Save: Nothing
Command: echo $TM_FILEPATH | sed
"s|^$TM_USER_ROOT_DIRECTORY\(.*\)\$|\1|"
Input: None
Output: Tried all versions ( Insert as Snippet / Replace Selected text
/ etc )
Kind regards,
Mats
----
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -
We've talked about this before, but I don't think anything became of
it. Here's the idea:
Create a preference so that new tabs are not created for every item
clicked in the project drawer. To create a tab you would have to
shift-command-click or something like that. Without the modified click,
the current file would open either in a special "current item" tab on
the left, that would simply be replaced by whichever item is clicked on
next.
This is similar to Safari's tabbed page behavior.
For super-organized people that remember to close all the tabs they
don't really need, they can choose not use the preference and retain
the current behavior.
For people like me that quickly reference other files and then forget
to close them, this would be a nice way to avoid unnecessary tab
clutter.
Ed
Especially when using things like the Subversion bundle, these files
showing up in the 'Open Recent' makes the feature approach useless. Is
there any way that these files could be ignored for this?
--
Robert M. Zigweid rzigweid(a)zigweid.net
http://rzigweid.zigweid.net
I'm starting to dig a little deeper and let TextMate do more for me.
Next stop, templates. While we're there, here are my questions about
them:
1. Can I control where my cursor appears after the template is filled
in?
and
2. In the project's New File dialog, the template list is in a
predefined order and the top ten items have key shortcuts. How can I
affect this listing, to get my templates were I want them?
Thanks.
James Edward Gray II
Thank you!
BTW I was dubious about the pen in the icon previously, but in my dock
it looks pretty good. (I've liked all the recent designs actually.)
Paul
The bundle is just gorgeous, especially for things like "svn blame".
It really shows the potential of the HTML output.
However.
svn is extremely slow on my computer (and perhaps on yours). Is there
any way to either (1) put up a status bar (cocoadialog will do it)
and/or (2) make the thing run in the background or otherwise not
block TM from running?
I'm thinking (2) is impossible unless Allan reworks how commands are called.
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
I took my own stab at an icon this morning, after reading Apple's
Guidelines. It didn't turn out at nice as anything that's been
presented here already, but I decided to post it anyway in case it
gives someone with more talent than me any ideas.
http://www.grayproductions.net/ruby/images/TextMate_Icon.png
In my defense, it looked a lot better when I was still playing with it
at large sizes in the ray tracer. :) You could almost read the code
and you could see the brushed metals. Ah well, it seemed like a good
idea at the time.
James Edward Gray II
I'm looking for something to replace Transmit, since TextMate won't
work as one of it's external editors. I need an ftp client that will
upload when TextMate Saves.
(Sorry, Allan I know you made suggestions via IRC, but I closed that
window. I think this topic deserves to be in the list archives
anyway.)
Thank you,
--==<< R i c h a r d B r o n o s k y >>==--
Wow, this icon quest is getting really exciting, but ever more
confusing, so I thought a simple poll between the two (???) top
contenders could be of general interest, and a lot less confusing as to
which one anyone is commenting on.
Yeah, I know I'm being a bit of an anorak, but can't help it, and I am
taking my medication daily ;-)
To register your vote, please do a reply with the name of your
preferred icon selected, and if you so wish add your reasons to why you
like it below the quoted text.
Any other comment belongs in a completely new thread. Please try to
keep it on point here. Thank you! ;-)
Icon A by Bartelme.
Icon B by Ethan.
My vote:
Icon A by Bartelme
Reason: I'm not entirely sure why, but I'm guessing it's something to
do with Bartelme's icon following the general "text editor" icon look,
and it is more in line with the 3D feel of the other Apple app icons in
the dock which I think is more appropriate and professional.
Kind regards,
Mats
----
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -
Greetings all (from a relatively new BBEdit->TextMate convert)
Is there an easy way to insert a file/directory path into a TextMate window?
I can do it using the slightly ugly applescript hack below, "Insert Finder
Selection", but it'd be nice to drag-then-hit-command-while-dragging or some
such.
Just for fun I've included a couple of Perl commands for reading in a file
"Perl Infile" (it's up to you what you do with it!) and for writing to a
file "Perl Outfile". They try to be a little bit helpful: if you've selected
text in TextMate the commands assume it's a filename and wrap around it,
otherwise CocoaDialog is pulled up and you must select a file. in "Outfile"
you can also select a directory: in this case it prompts for a filename to
write to. See Eric's earlier post about CocoaDialog (http://cocoadialog.sourceforge.net/)
You will need to change the $CD variable used in these scripts if you choose
to install it somewhere other than /Applications .
Regards,
Paul
------------------------------------------------------------------------
Insert Finder Selection:
------------------------------------------------------------------------
Save: Nothing
Command:
osascript<<END
set linefeed to "
"
tell application "Finder"
set x to the selection
if the length of x is 0 then
return ""
end if
set mylist to {}
repeat with i from 1 to the number of items in x
set y to item i of x as alias
set mylist to mylist & (POSIX path of y)
end repeat
end tell
END
Input: None
Output: Insert after selected text
Key Equivalent: command-option-ctrl F
------------------------------------------------------------------------
------------------------------------------------------------------------
Perl Infile
------------------------------------------------------------------------
Save: Nothing
Command:
perl -e '
my $CD="/Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog";
my $TMD=$ENV{'TM_DIRECTORY'};
my $selection=$ENV{'TM_SELECTED_TEXT'};
my $file;
if ($selection){
($file=$selection)=~s/\s+$//; # kill any trailing space
}else{
my $rv=`$CD fileselect --text "Select a file" --no-newline --with-directory "$TMD"`;
chomp($file = $rv);
}
exit unless $file; # user cancelled
print <<HERE
my \$infile = "$file";
open IN , "\$infile" or die "Input error: \$infile\\n\$!";
while ( <IN> ) {
}
HERE
'
Input: None
Output: Replace selected text
Key Equivalent: command-option-ctrl I
------------------------------------------------------------------------
------------------------------------------------------------------------
Perl Outfile
------------------------------------------------------------------------
Save: nothing
Command:
perl -e '
my $CD="/Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog";
my $TMD=$ENV{'TM_DIRECTORY'};
chomp(my $rv=`$CD fileselect --text "Select a file" --no-newline --select-directories --with-directory "$TMD"`);
if (-d $rv){ # dir selected: need to append name
my $out=`$CD standard-inputbox --text "$TMD" --informative-text "Enter the name of the file" --no-cancel`;
my ($name)=($out=~m/.*\n(.*)/m);
$rv.="/$name";
}
chomp(my $file = $rv);
exit unless $file; # user cancelled
print <<HERE
my \$outfile = "$file";
open OUT , ">\$outfile" or die "Outfile: \$outfile\\n\$!";
select OUT; # print to OUT filehandle by default
HERE
'
Input: None
Output: Replace selected text
Key Equivalent: command-option-ctrl O
------------------------------------------------------------------------
Hi,
During the last couple of weeks I have not been able to comepletely
follow all the stuff going on in this mailinglist. I completely missed
the introduction of the "view as HTML" feature. I noticed a couple of
references to it and have seen that some people use it now in their bundles.
However, when I wanted to get into it, I found that bundles are not
really documented. Could people perhaps put some documentation on the
wiki about their bundles?
But an even better way would be to have some help/description feature for
bundles within TM...Allan, what's your take on that?
Jeroen.
--
"We apologize for the inconvenience"
(See "The Hitchhikers Guide to the Galaxy")
Beta 4 is out -- to those of you who got the beta 3 w/o bundles and
therefor installed these as user/local bundles, I'd recommend removing
these, since updated defaults won't show otherwise (but new defaults
will).