[TxMt] New TM Doc in Finder Contextal Menu. Any ideas ??

Eric Hsu erichsu at math.sfsu.edu
Sat Feb 12 01:46:38 UTC 2005


At 11:41 PM +0100 2/11/05, fatal wrote:
>You beat me to it Eric,

Well, heck if I'd known you were working on it, I wouldn't have 
bothered! :)  (I'm not supposed to be working on this non-work kind 
of stuff...)  Maybe next time we should write to the list and reserve 
a request. I personally would rather other people write these gadgets 
for me!

(Hey, Chris Thomas, weren't you going to write an Icon Chooser? Don't 
make me do it...)

There are a few more CMs that I was thinking should be written. 
Basically all the ones aimed at BBEdit at the OMC site could be 
altered for TM.  Also, a simple 'Edit this Selected Text in TM'. I 
found myself in Equation Service trying to write some LaTeX and 
missing a decent editor... but Equation Service doesn't (wait for it) 
support Services. Oh well.  I also had this visionary idea of having 
a 'Edit Filenames in TM' CM. I often have annoying rename tasks (like 
chop off a leading word and add an extension) that would take 3 
seconds in TM but forever either in the Finder or an annoying amount 
of time getting a shell script loop right.  But if I could just 
select a bunch of files, send it to TM and edit them there... ahhh. 
It wasn't obvious to me how to deal with cases where someone deleted 
a lines, etc. I told you it was visionary.

>The command opens a dialog asking for a name for the new file and I 
>used "open -a" instead of "tm" CLI command ". IMO, the advantage is 
>that the Syntax highlight is selected according to the extension you 
>gave to the file name. Plus, with the tm CLI, the file doesn't 
>"exists" until you save it and you have to "Saves as" to give it a 
>proper name.

I thought that was a feature of my version. :)  Seriously, I didn't 
want to deal with name collisions etc etc.  But maybe if it turns out 
people want that feature, I'll put your version in the svn 
repository...

>And I made it in Ruby cause I'm lazy. ;)
>(Maybe Eric could make it in shell?)

How do you do it in Ruby? Do you have OMC just call the Ruby script, 
or can it support Ruby inline?

best, Eric
-- 
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu at math.sfsu.edu
http://math.sfsu.edu/hsu



More information about the textmate mailing list