[TxMt] services menu

Lloyd Williams wlw3 at mac.com
Fri Dec 29 13:12:10 UTC 2006


Thank you Fred, instal command is what I need. I was searching under  
"services" in wiki and manual to no avail. Thanks again.


On Dec 29, 2006, at 8:24 , Fred B wrote:

> On 12/29/06, Fred B <fredb7 at gmail.com> wrote:
>> You can use ThisService[1] to create your own services from any  
>> script.
>>
>> [1]: http://wafflesoftware.net/thisservice/
>>
>> I don't have much time now, but here is a quick script to open
>> selected text in TM:
>>
>> ✂------✂------✂------✂-----
>> #!/usr/bin/env ruby
>>
>> path = "/tmp/tempText_" + `date "+%d-%m-%G_%H-%M-%S"`.chomp
>> text = <<YOUzWONTzMATCHzTHISzEVA
>> #{STDIN.read}
>> YOUzWONTzMATCHzTHISzEVA
>>
>> f=File.new(path, "w")
>> f.puts text
>> f.close
>> `open -a TextMate "#{path}"`
>> ✂------✂------✂------✂-----
>>
>> Save it in a file, select this file in ThisService, choose Type  
>> "both"
>> and eventually create a shortcut. Voilà.
>>
>> BTW, are you aware of the "Edit in Textmate" input manager[2]? It  
>> is a
>> much better solution for editable text.
>>
>> [2]: http://macromates.com/textmate/manual/ 
>> using_textmate_from_terminal#cocoa_text_fields
>>
>> You can find various contextual menus to do those kind of things in
>> the repository[2]
>>
>> [3]: http://macromates.com/svn/Bundles/trunk/Tools/CM/
>>
>> --
>> FredB
>>
>
> Ooops. You should choose Type "Act on Input" instead of "Both". Sorry.
>
> --
> FredB
> http://geekthang.com
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list