I have read and seen the "edit in TextMate" functionality, but would rather than having a hack use the Services menu for this. I have also read that this was a functionality before that was removed. Is it possible to add that back in easily? Those who don't want to have this Services menuitem can then use e.g. Service Scrubber (http:// www.petermaurer.de/nasi.php?section=servicescrubber) to remove it.
Or am I missing something here?
-e
-- egil helland / it consultant (mcse, web technology) web: ikon.as / egil.net mob: +47-91315555
On May 9, 2006, at 3:57 AM, Egil Helland wrote:
I have read and seen the "edit in TextMate" functionality, but would rather than having a hack use the Services menu for this. I have also read that this was a functionality before that was removed. Is it possible to add that back in easily? Those who don't want to have this Services menuitem can then use e.g. Service Scrubber (http://www.petermaurer.de/nasi.php? section=servicescrubber) to remove it.
One of the reasons the behavior changed was that with a service, the application calling the service is blocked until the service finishes. I.e. when you use edit in textmate as a service from a textfield in your browser, you cannot use your browser again until you finish editing, and strange things happen (IIRC) if you switch to your browser accidentally. I tend to use the browser quite a bit while writing, so I personally ran into problems with this all the time.
The advantage of the service menu item option is that it works with mozilla and camino as well, if I remember correctly. One of the big disadvantages is that it requires you to select the text you want to edit first. If you are going to have to select the text anyway, just do a copy, move to textmate, open new document, paste and edit away, then select-all, copy, paste back. Only 6 extra keystrokes, plus one to set the language for the document if it's not plain text.
I wouldn't call the current "Edit in TextMate" a hack. It is an Input Manager, actually used for what Input Managers are essentially supposed to do. You can even provide it with a list of applications that you do not want it to target.
Or am I missing something here?
-e
-- egil helland / it consultant (mcse, web technology) web: ikon.as / egil.net mob: +47-91315555
Haris
On 9/5/2006, at 15:12, Charilaos Skiadas wrote:
[...] The advantage of the service menu item option is that it works with mozilla and camino as well, if I remember correctly
Yes, interestingly though, it sort of fails for Tiger’s Mail, as they do not read the result from the service, but instead read the clipboard, when the service completes (rdar://problem/4156075).
On 9. mai. 2006, at 17:39, Allan Odgaard wrote:
On 9/5/2006, at 15:12, Charilaos Skiadas wrote:
[...] The advantage of the service menu item option is that it works with mozilla and camino as well, if I remember correctly
Yes, interestingly though, it sort of fails for Tiger’s Mail, as they do not read the result from the service, but instead read the clipboard, when the service completes (rdar://problem/4156075).
I see. But my issue is not to change the edit menu hack, but rather mimick the BBEdit style of Services menu functionality - the "New window with Selection" BBEdit item, to be exact. Forgot to specify that in my previous mail, sorry about that.
With such a Services menuitem, I can just select some text that I want to deal with, and send it to TextEdit right away, and TextEdit does not need to wait for anything or anyone... Thats what happens with BBEdit at least.
-e
-- egil helland / it consultant (mcse, web technology) web: ikon.as / egil.net mob: +47-91315555
On May 9, 2006, at 12:39 PM, Egil Helland wrote:
With such a Services menuitem, I can just select some text that I want to deal with, and send it to TextEdit right away, and TextEdit does not need to wait for anything or anyone... Thats what happens with BBEdit at least.
So you are essentially looking for a shortcut for: "cmd-C, cmd-tab to textmate, cmd-N, cmd-V". Am I right? Perhaps an applescript could do that easily? That might qualify as an interesting service, though I personally would probably not use it, but I guess YMMV.
-e
Haris
Haris wrote...
On May 9, 2006, at 12:39 PM, Egil Helland wrote:
With such a Services menuitem, I can just select some text that I want to deal with, and send it to TextEdit right away, and TextEdit does not need to wait for anything or anyone... Thats what happens with BBEdit at least.
So you are essentially looking for a shortcut for: "cmd-C, cmd-tab to textmate, cmd-N, cmd-V". Am I right? Perhaps an applescript could do that easily?
In the repository you'll find a nice OnMyCommand set written by FredB that implements this and several other bits and pieces. I only found it again by control clicking on some random text in Mail the other day. To use it you require OnMyCommand (which includes OMCEdit, a nice GUI way to view and create contextual menu items). See http:// free.abracode.com/cmworkshop/
Here's the list of contextual menu items provided by FredB's plist (taken from the accompanying README file). You can use any subset of these that look, err, useful.
Cheers, Paul ======================================================================= -Open in TextMate (pop it up on a file or folder) -New TextMate file here (pop it up on a directory; if you pick a file, it puts a new file in the same directory)
-New TextMate file here (alt)
(Same as Eric's version, except it creates the file first (with a dialog asking you for a name) then opens it (with open-a instead of mate). That means: The language/Syntax-Highlight is selected according to the file extension If a file with the same name already exists in the directory, it opens it without any change)
-New TextMate file here with Clipboard text (Same as above, but include the text in the Clipboard, if any.) -Open selected text in TextMate -Set type and creator to TextMate -Edit OMC commands in TextMate -List folder content in TextMate -List pkg content in TextMate =======================================================================
On 10. mai. 2006, at 02:15, Paul McCann wrote:
Haris wrote...
On May 9, 2006, at 12:39 PM, Egil Helland wrote:
With such a Services menuitem, I can just select some text that I want to deal with, and send it to TextEdit right away, and TextEdit does not need to wait for anything or anyone... Thats what happens with BBEdit at least.
So you are essentially looking for a shortcut for: "cmd-C, cmd-tab to textmate, cmd-N, cmd-V". Am I right? Perhaps an applescript could do that easily?
In the repository you'll find a nice OnMyCommand set written by FredB that implements this and several other bits and pieces. I only found it again by control clicking on some random text in Mail the other day. To use it you require OnMyCommand (which includes OMCEdit, a nice GUI way to view and create contextual menu items). See http://free.abracode.com/cmworkshop/
Here's the list of contextual menu items provided by FredB's plist (taken from the accompanying README file). You can use any subset of these that look, err, useful.
Cheers, Paul ====================================================================== = -Open in TextMate (pop it up on a file or folder) -New TextMate file here (pop it up on a directory; if you pick a file, it puts a new file in the same directory)
-New TextMate file here (alt)
(Same as Eric's version, except it creates the file first (with a dialog asking you for a name) then opens it (with open-a instead of mate). That means: The language/Syntax-Highlight is selected according to the file extension If a file with the same name already exists in the directory, it opens it without any change)
-New TextMate file here with Clipboard text (Same as above, but include the text in the Clipboard, if any.) -Open selected text in TextMate -Set type and creator to TextMate -Edit OMC commands in TextMate -List folder content in TextMate
-List pkg content in TextMate
=
Thanks,
that was a good link! I would still prefer the simplicity of a standard approach in the Textmate application itself, but this is a good way to get around it.
-e
-- egil helland / it consultant (mcse, web technology) web: ikon.as / egil.net mob: +47-91315555
Haris wrote:
Egil Helland wrote:
With such a Services menuitem, I can just select some text that I want to deal with, and send it to TextEdit right away, and TextEdit does not need to wait for anything or anyone... Thats what happens with BBEdit at least.
So you are essentially looking for a shortcut for: "cmd-C, cmd-tab to textmate, cmd-N, cmd-V". Am I right? Perhaps an applescript could do that easily?
One benefit is that quicksilver picks up services, though I've added my own quicksilver action that pipes text to mate anyway, so the service isn't really essential.
-Jacob
Teck Ninja wrote:
On May 10, 2006, at 11:05 AM, Jacob Rus wrote:
One benefit is that quicksilver picks up services, though I've added my own quicksilver action that pipes text to mate anyway, so the service isn't really essential.
Do you mind sharing the Quicksilver action for me?
No problem:
#!/bin/bash echo "$1" | mate &
Save as ~/Library/Application Support/Quicksilver/Actions/mate.sh
-Jacob