Archive for the ‘TextExpander Tips’ Category

TextExpander: Date and Time Math

Tuesday, October 28th, 2008

Let’s say it’s your job to remind people to do something. Maybe you are the accounts receivable person, and you regularly need to remind people to pay you in 15 days. If you use TextExpander, your days of looking at the calendar and calculating that date are over!

We added date and time math capability to TextExpander 2.5. Now you can create a snippet that automatically inserts a date that is 15 days from today. Here’s how:

1) Create a new snippet by clicking on the plus (+) sign under your list of snippets on the left in the TextExpander Preference pane.

2) Click on the plus (+) sign under the snippet content pane on the right. Choose Date/Time Math > Add Day(s).

3) TextExpander inserts %@+1D into your snippet content pane. Change “1D” to “15D”.

4) Insert the date format you wish to appear, again using the plus (+) sign menu on the right. For example, if you want the date to appear in formatted “October 29, 2008″, insert the following:
 - Choose Date > Month > January. Add a space.
 - Choose Date > Day > 1. Add a comma and space.
 - Choose Date > Year > 2001  

5) When you are done, the snippet content should be: 
%@+15D%B %e, %Y

6) Give your snippet an abbreviation, such as “d15″ or “payupnow”.

TextExpander 2.5 is a free upgrade to registered users of TextExpander 1.x and earlier. You can download it here. Besides the date/time math, we’ve also added some new built-in snippet groups: Internet Productivity (which includes the AppleScripts we’ve posted here for URL shortening) and Symbols (for those who need to use symbols like copyright, trademark, euro, yen, infinity, etc.).

Get Tr.im With TextExpander

Monday, October 20th, 2008

We’ve posted AppleScript TextExpander snippets that generate shortened URLs with bit.ly and TinyURL. A few weeks ago on Twitter, TJ asked if we couldn’t do one for the shortening service tr.im. I thought I would use TJ’s challenge as a personal one to push the limits of my limited geekiness and figure it out myself. I got as far as looking at the tr.im API, and thought “I’m not going to be able to figure this out without help.” Then I got busy with stuff and promptly forgot about it.

A few days ago, I saw this post and tried the script the author offers. It didn’t work for me, so I referred to my colleague Greg (aka he who knows all about TextExpander). He told me that:

The author is using a non-standard Unix tool (wget), i.e. not one which is installed with stock Mac OS X. It was fairly easy to replace his use of wget with curl, and so I’ve done.

I definitely would have never figured that out myself. You can download Greg’s revised AppleScript snippet and try it out. The zipped file contains a TextExpander snippet group (of one snippet) that you can add to your library by choosing “Add Group From File…” from the Add menu.

And you’re welcome, TJ. ;-)

TextExpander: Nice AppleScript Shortcut for bit.ly

Friday, July 25th, 2008

We’ve already noted an easy way to get TinyURLs via TextExpander’s AppleScript snippet capabilities.

bit.ly is another URL shortening service that has some very interesting features, like history, thumbnails and click-through stats. Jonathan Berger posted an article at LIVEdigitally on creating a TextExpander AppleScript snippet to quickly generate bit.ly shortcuts.

It works. Here’s the link to his article, bit.lyfied: http://bit.ly/2Oroik :-)

TextExpander: Accented Words in English

Wednesday, July 23rd, 2008

It all got started when I was typing the word “fête”.

“Wouldn’t it be nice,” I thought, “if I didn’t have to go searching in the Special Characters palette for the e+circumflex every time I wanted to type “fête” or “crêpe”?” So I started adding these accented words to my TextExpander snippets. The abbreviation was the word without the accent mark, and when I typed it, it would be replaced with the accented version.

Once I had created a few of these, I thought it would make a handy snippet group for some folks. I came up with a short list of words, and then I discovered this Wikipedia article: List of English Words with Diacritics. I picked the words that seemed most useful to me and created a snippet group.

List of the Accented Words Snippet Group (PDF)

If you download TextExpander 2.3, you can easily add this Accented Words group by clicking on the plus sign (+) under your snippet list in the TextExpander Preference Pane, and choosing “Add Predefined Snippet Group.”

The great thing about snippet groups that are hosted online is that you can make additions. If you have any suggestions for accented words to be added, email them to me. If you have ideas for other useful snippet groups, or have created one yourself that you want to share, just let me know.

Olé!

TextExpander: CSS Snippet Group

Tuesday, May 20th, 2008

We just released TextExpander 2.2. We added a new snippet group of CSS definitions (created by me!) that you can use. To do so, click on the plus sign (+) below the snippet list and choose “Add Predefined Group”. “CSS Snippets” has been added to the list.

It’s always an fun intellectual exercise for me to develop a new snippet group for public use. Trying to anticipate how people will use the snippets is a challenge. I think it’s important for the abbreviations in a group to have a common leading character so that they are easier to remember. The HTML snippets all use the comma. The logic there is that Shift + comma produces a left angle bracket, the leading character in HTML tags. For CSS, I used the semi-colon. It’s easy to reach on the keyboard, and a semi-colon is used a separator for CSS property definitions. And, as is important with all TextExpander abbreviations, no actual words begin with a semi-colon.

Here’s a PDF with the CSS abbreviations and snippets. (You did know that you can print your snippets and abbreviations as a handy list, right? Command + P to print a group, Option + Command + P to print all groups.)

A few notes on these snippets:

  • All the abbreviations begin with a semi-colon
  • There are abbreviations for basic HTML selectors, like ;body, ;h1, ;ul, ;em, which expand into CSS for the corresponding tag, and reposition your cursor in the middle
  • There are the commonly-used properties, like ;color, ;lheight, ;fsize, and ;border
  • There are also some “packaged” snippets, like ;sans, ;serif, ;fs10, (font-size: 10px;), ;lh16 (line-height: 16px;)

Anyway, give it a whirl and let me know what you think! Any suggestions for additions would be very welcome.

TextExpander: Catching Up with Really Fast Typists

Thursday, April 24th, 2008

We just released TextExpander 2.1 this week. It now supports one-character abbreviations. If you use a delimiter to trigger your expansions, you can turn any letter or character into an abbreviation for a snippet.

We also improved the performance and reliability for really fast typists. I say “really” fast, because I am a fast typist, and I never had a problem with TextExpander not keeping up with me. I just tested myself at 10 Fast Fingers, which I found via a b0rg_tech’s blog post, “Saving Seconds.”

Want to challenge me? :-)
70 words

Quick TinyURLs with TextExpander and AppleScript

Wednesday, March 19th, 2008

[ Update (10/22/08): We've had many reports the original AppleScript by David Smalley has stopped working. The improved AppleScript by JD Strong continues to work. Even David Smalley posted that he is using JD Strong's AppleScript now.

Also, if you want to see the step-by-step instructions for adding this AppleScript to TextExpander, Jeff Gamet just posted a great tip at The Mac Observer. ]

I just came across this neat tip on developer David Smalley’s blog. It uses AppleScript to generate a tinyURL with a TextExpander abbreviation.

(If you’re not familiar with Tiny URL, it’s an online service that converts long URLs into short ones more appropriate to share in email and microblogs.)

I am no AppleScript maven, but it sounded pretty cool. I’ve been using Tiny URL a lot lately since I started using Twitter. So I consulted Greg, whose works on TextExpander development, to see what he thought. His response:

This does work, and it’s quite convenient. Here’s an easy way for you to import this:

And he sent me the AppleScript wrapped in a TextExpander Group. You can download it here:
http://www.smileonmymac.com/textexpander/tinyurl.textexpander.zip

Download and unzip it, and then add the group in the TextExpander preferences pane.

Then you’re set to follow Greg’s instructions:

You select a URL, copy it to the Clipboard, then type “tinyurl” (and your delimiter if you’re not doing instant expansion) then wait a few seconds and “tinyurl” will be replaced by a tiny URL.

If you’re a real geek, you can grab the AppleScript from the original blog post and create your own AppleScript snippet in TextExpander.

TextExpander: Abbreviation Strategies

Friday, February 15th, 2008

I just got a short tip from Austin in Carlow, Ireland:

I have all my abbreviations ending with “z” so that there is little chance of them getting confused with a word I don’t want substituted. It makes them easier to remember, and not many words (quiz is the only one that springs to mind) end in z.

This is the first tip where someone has suggested using the last character in an abbreviation to differentiate it from actual words.

When we first started posting TextExpander tips, we got a fairly extensive one from TJ on organizing abbreviations by context. That tip inspired me to use the forward slash (/) as the first character in all my abbreviations for URLs, i.e. /somm = http://www.smileonmymac.com, /gm = http://maps.google.com. [1]

I’ve started using “x” as a leading character for a lot of miscellaneous snippets, on the theory that not many words begin with “x”. I’d have to rewire my brain to think like Austin, using the last character as the differentiator.

What about you? Share your TextExpander abbreviation strategies in the comments.

[1] You might wonder how I can type my abbreviations without expanding them. The trick is to move the cursor using the arrow keys backward and forward once before you get to the end of the abbreviation. I learned this in a tip from Greg.

TextExpander As A Study Aid

Sunday, January 6th, 2008

Shishir from India has an interesting way of using TextExpander:

Thanks for developing this great product. Being new to the Mac, I have been trying out a lot of programs, and just happened to run into TextExpander.

At first I started using as most people would - to produce recurring snippets while typing. But now I use it as a system where I can keep tidbits of information I need to memorize and recall them quickly. When I am studying, if I come across a definition I need to memorize, I just select the text and create a shortcut for it with the prefix ll (learn). This way when I am reading and come across a term I dont remember, I quickly type the shortcut in my scratch pad and am able to see the definition. This has really helped me memorize a lot of stuff.

This is a good opportunity to point out the new Hotkey preference in TextExpander 2 for creating snippets on the fly. You can designate the key combination you want to use for creating snippets from a selection or from the Clipboard in the TextExpander pane in System Preferences, under the “Preferences” tab.

Once you set the hotkey, all you have to do is select the content you want to make into a snippet and press the hotkey combination. The TextExpander pane will open and the selected contents will be pasted into the snippet content field. Assign an abbreviation and you’re done.

TextExpander: New Video Review

Wednesday, December 19th, 2007


macapper.jpg
Michael Mistretta at MacApper has posted a very good video review of TextExpander’s features. It covers the new TextExpander 2, so it makes a great sequel to Merlin Mann’s demo at MacBreak.

MacApper will also be giving away two copies of TextExpander:

In order to enter this giveaway, you must comment on this post with 3 of the most repetitve phrases that you use every day. Make us laugh. Alternately you can add some suggestions on what features you would like to see with TextExpander.

Some of the TextExpander abbreviations that have been posted certainly made me smile…