Hi there,
When I hit Control-Shift-L to wrap my selection into an (A href=...) tag, TextMate takes a beachball timeout of 40 (fourty!) seconds, and when it returns the href-part is empty.
What's up, is it just me?
If so, is there another easy way to make links?
For reminders, I'm using tm 1.1b17, and this is the snippet content:
<a href="${1:` # if the clipboard contains a single line, let's use that if [[ $(pbpaste|wc -l) -eq 0 ]] then pbpaste|sed 's/&/&/g' else echo http://site.com/ fi `}">${TM_SELECTED_TEXT:Link text...}</a>
Looks fine to me, assuming there's a real shell behind. For discussion let's say my clipboard contains two lines of code, i.e. it isn't huge.
Peter
On 21/09/2005, at 11.27, Peter Vohmann wrote:
When I hit Control-Shift-L to wrap my selection into an (A href=...) tag, TextMate takes a beachball timeout of 40 (fourty!) seconds, and when it returns the href-part is empty.
What's up, is it just me?
The snippet was supposed to insert the contents of the clipboard (by calling pbpaste) into the href-part, but when TM is the clipboard owner, it will sort of deadlock (but timeout) -- which doesn't happen for me, since I use QS's clipboard enhancer, and thus didn't see the problem when I made the snippet.
If so, is there another easy way to make links?
(duplicate and) remove the code part, i.e. the stuff between (and including) the `'s.
Am 21.09.2005 um 11:40 schrieb Allan Odgaard:
On 21/09/2005, at 11.27, Peter Vohmann wrote:
When I hit Control-Shift-L to wrap my selection into an (A href=...) tag, TextMate takes a beachball timeout of 40 (fourty!) seconds, and when it returns the href-part is empty.
The snippet was supposed to insert the contents of the clipboard (by calling pbpaste) into the href-part, but when TM is the clipboard owner, it will sort of deadlock (but timeout) -- which doesn't happen for me, since I use QS's clipboard enhancer, and thus didn't see the problem when I made the snippet.
Ouch. Didn't realize that pbpaste was blocking, thanks for the explanation.
For those that want to try the clipboard enhancer route, fire up QuickSilver, load the Clipboard Plug-in, and activate "Capture History" on the Clipboard Preferences.
Cmd-Space Cmd-L then will show the clipboard history, and double-clicking an entry could paste it into the frontmost application.
There are so many plug-ins in Quicksilver, I can only digest them one at a time. ;o)
Peter
Why does pbpaste deadlock when TM is the clipboard owner?
On Sep 21, 2005, at 5:40 AM, Allan Odgaard wrote:
The snippet was supposed to insert the contents of the clipboard (by calling pbpaste) into the href-part, but when TM is the clipboard owner, it will sort of deadlock (but timeout) -- which doesn't happen for me, since I use QS's clipboard enhancer, and thus didn't see the problem when I made the snippet.