Archive for May, 2009

Use TextExpander with DropBox

Wednesday, May 13th, 2009

Until recently, the only reliable way to synchronize data between two Macs was to use Apple’s MobileMe service. TextExpander has support for MobileMe so you can sync your snippets between all of your Macs.

With the rise in popularity of “cloud computing,” third-party syncing services such as Dropbox have come on the scene, and with a bit of work, you can sync your snippets using it as a MobileMe alternative.

Dropbox is a free online storage service that synchronizes the data of a folder in your home directory with any other Mac you have the service installed on. When you make a change to a file or add something new to your Dropbox, their agent application will automatically push the changes to the cloud in the background and notify your other Macs of the change so they pull the update.

This works great for TextExpander because each time you create or modify a snippet, it saves the Settings.textexpander file that contains your settings and snippets. If we store this file in Dropbox, it will automatically update on each of your Macs. Dropbox can even deal with your Mac being offline temporarily.

This isn’t for the faint of heart. You will need a bit of Terminal-fu to make sure that things run seamlessly. If you’re comfortable with the requirement, here’s how to sync TextExpander using Dropbox.

TextExpander 2.5.1 is required for proper synchronization with Dropbox. It’s a free update:

http://www.smileonmymac.com/textexpander/download.html

On your primary machine:

  1. Install Dropbox (https://www.getdropbox.com/)
  2. Close System Preferences
  3. In the Finder, go to your Dropbox folder and create a folder called “Library.”
  4. Drag the ~/Library/Application Support/TextExpander folder to your Dropbox/Library folder. Your TextExpander settings and snippets are now stored on Dropbox.
  5. Open Terminal.app and type the following command:

    ln -s ~/Dropbox/Library/TextExpander ~/Library/Application\ Support/TextExpander

The symlink will then redirect TextExpander to your Dropbox folder to grab the snippet information. Take note that you won’t get any sort of confirmation in the Terminal that this operation succeeded. You can confirm it by going to [Home]/Library/Application Support and checking to see if the TextExpander folder is an alias now.

On your subsequent Macs:

  1. Install Dropbox (https://www.getdropbox.com/)
  2. Close System Preferences
  3. Delete the ~/Library/Application Support/TextExpander folder. Since the snippets are on Dropbox, we need to symlink it like we did on the primary machine.
  4. Open Terminal.app and type the following command:

    ln -s ~/Dropbox/Library/TextExpander ~/Library/Application\ Support/TextExpander

As with before, you won’t get confirmation in Terminal but can be sure by checking that [Home]/Library/Application Support/TextExpander is an aliased folder.

This technique should work with almost any Mac application you use. It can be used with Things and Delicious Library since they don’t have native syncing support built in.

TextExpander: HTML and Shell Script Tips from Macworld

Tuesday, May 12th, 2009

mw-logo.gifA few interesting tips were published on Macworld.com today, in a piece titled “Creative text expanding“. Derik DeLong shared some ways he uses TextExpander to easily insert HTML tags using the clipboard. He also gives a few examples of using shell script snippets in the Terminal to execute Unix commands.

I am certainly the least geeky person here at SmileOnMyMac HQ, so I was pleased to discover that even I could figure out how to use the Terminal and TextExpander to run a word count on text copied to the clipboard. Not hard at all. Don’t forget to change your snippet type to “Shell Script” when you’ve pasted the snippet into your TextExpander library.

Latex math and Greek symbols

Monday, May 4th, 2009

Carlo Beenakker has developed a TextExpander snippet group with Latex math and Greek symbols which he uses when discussing math and physics in email or chat. Some examples from this group:

\alpha α Greek letter alpha
\infty Infinity symbol
\int Integral symbol
\sqrt Square root symbol

You can download the Latex math and Greek symbols group here:

http://ilorentz.org/beenakker/Latexsymbols.textexpander

Choose Add Group from File… from the + menu to import the new group.

Thanks for sharing your group with us, Carlo!