Skip to Content

Summer Budget Travel Tips from Gadling
AOL Tech

Filed under: Features, How-tos, Productivity, Tips and tricks

TextExpander Tip: Using the Clipboard in a Snippet



Along with Quicksilver, TextExpander is one of my must-have Mac utilities. TextExpander is a "snippet" utility that will automatically paste in content based on user defined abbreviations. For instance, I have "bc" set to expand to "because." However, the pasted text can be much longer (e.g. "sig" becomes a several line email signature). Today on the SmileOnMyMac Blog, I ran across a great tip I hadn't previously known about TextExpander (RTFM), viz. that you can use "%clipboard" as a variable in your snippets. When the snippet expands the clipboard content is automatically placed wherever "%clipboard" appears. The original tip involved using this to create Amazon.com links, but it quickly occurred to me that I could use this to easily create hyperlinks when for posting on blog comments (not TUAW) or on forums.

Oftentimes I want to paste a link into a forum post and I want to make it a hyperlink, not merely text. So all you need to do is add the following snippet to TextExpander, which I called "hlink":



In case you want to cut and paste, the Content is: <a href="%clipboard">%clipboard</a> Now when you want to paste in a link, just copy the URL to the clipboard (e.g. from your browser), and type "hlink" and you'll get the hyperlinked URL.

<a href="http://www.tuaw.com/">http://www.tuaw.com/</a>

Sometimes you don't want the text to be the link itself, so I created another snippet I called "htext":



The Content is: <a href="%clipboard">%|</a> When you copy a URL to the clipboard and then type "htext" it will paste in the URL with the cursor automatically placed before the </a> so you can immediately start typing your link text ("%|" will position the cursor at that point after expansion).


Of course this can be expanded to other uses too. I created a snippet called "hmd" that does the same thing for Markdown:



The Content is: [%|](%clipboard) Again, copy the URL to the clipboard, type "hmd" and the cursor is automatically at the right spot for putting in the link text.

Needless to say, this tip can be expanded in any number of ways. Be sure to check out the other options TextExpander allows, including date and time variables, cursor placement, and delimiter abandonment (convenient for addresses and telephone numbers, etc. in forms).

Reader Comments (Page 1 of 1)

Tip of the Day

To find out what version of Mac OS you are running, go to the Apple logo in the top left corner, click it and choose About This Mac. From that window you will see the version number, processor, memory and chosen startup disk. Clicking Software Update will check for updates, and More Info... will open up an extensive list of everything on your machine.


Follow us on Twitter!
TUAW [Cafepress]

Sponsored Links

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor
Apple Texas Hold 'Em

 

More Apple Analysis

AOL Radio TUAW on Stitcher