[TxMt] wrap selection as link

David Clark david.clark at umb.edu
Wed Jul 26 20:15:59 UTC 2006


I tried adding the following comment to the blog with no luck:

once again - you are my hero!

I hadnt really been using "wrap selection as link" before today...

One thing that caught me though -- can you grep the selection for
http, and/or edit the snippet to  be:

<a href="http://${1:`
   # if the clipboard contains a single line, let's use that
   export __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100
   if [[ $(pbpaste|wc -l) -eq 0 ]]
      then pbpaste|sed 's/&/&/g'
      else echo http://site.com/
   fi
`}">${TM_SELECTED_TEXT:Link text...}</a>

-- 
dc
-----
David Clark
Web Specialist
Institute for Community Inclusion (http://www.communityinclusion.org/)
david.clark at umb.edu
(617)  287-4318



More information about the textmate mailing list