How to Set Up Text Expansion on Mac

Type a short keyword and get your email address, signature or a whole template. How to set up text expansion on Mac with Raycast Snippets, or with macOS Text Replacements.

UPDATED

You type the same things all day: your email address, a meeting link, "Thanks for reaching out", a code block you always need.

The short answer: use Snippets in Raycast. It's built in and free. Run Create Snippet, paste your text and give it a keyword like !sig. From then on, typing !sig in any app replaces it with your signature. macOS also has Text Replacements in System Settings → Keyboard, which works for short, plain text.

MethodWorks inDates, clipboard, cursorImport from other tools
Raycast SnippetsAlmost any appYesYes
macOS Text ReplacementsMany native Mac appsNoNo

Expand text with Raycast Snippets

  1. Open Raycast and run Create Snippet.
  2. Paste your text into Snippet Text and give it a Name.
  3. Add a Keyword, like !email or ;;addr, and save.
  4. Type the keyword in any app. Raycast replaces it with your text.

Pick keywords you'd never type by accident. A symbol at the start, like !, ;; or /, does the trick. Spaces, quotes and backticks can't be part of a keyword.

Search Snippets shows each snippet with its keyword, ready to paste.
Search Snippets shows each snippet with its keyword, ready to paste.

Pro tip: add placeholders to make one snippet do more. {date} inserts today's date, {clipboard} your last copied text, and {cursor} puts the cursor where you'll type next. A meeting-notes snippet with {date} and {cursor} is ready to fill in the moment it expands.

To find a snippet without its keyword, run Search Snippets. You can search by name, keyword or content, filter by tag, and paste it into the app you're in.

A few ideas to start with:

  • !sig for your email signature.
  • ;;log for console.log({cursor}).
  • !zoom for your meeting link.
  • !shrug for ¯\_(ツ)_/¯.

Browse ray.so/snippets for more ideas.

Settings worth knowing

In Settings → Snippets:

  • Expansion Mode: expand as soon as you finish the keyword, or wait until you type a space or punctuation.
  • Disabled Applications: apps where snippets never expand. 1Password and Keychain Access are already on the list.
  • Injection Delay: if a snippet expands unreliably in one app, a longer delay usually fixes it.

Coming from another app?

Run Import Snippets to bring your library from TextExpander, aText, Espanso or PhraseExpress. On a team, shared snippets keep support replies and company boilerplate the same for everyone.

Snippets work on Windows too.

Here's a two-minute tour of Snippets:

Use Text Replacements

macOS has a simple text expander of its own.

  1. Open System Settings → Keyboard and click Text Replacements.
  2. Click +. Type the short version under Replace and the full text under With.
  3. Type the short version, then a space, in a Mac app that supports it.

Text Replacements sync across your Apple devices with iCloud. They're plain text only, so there are no dates, clipboard or cursor placeholders, and apps with their own text fields, like many code editors and some web apps, often ignore them.

New to Raycast?

Here's a quick tour of what else it can do, in under seven minutes:

Frequently Asked Questions

Does Mac have a built-in text expander?

Yes. Text Replacements in System Settings → Keyboard swaps short text for longer text and syncs over iCloud. It's plain text only, with no dates, cursor position or clipboard, and some apps ignore it.

What's a good keyword for a snippet?

Something you'd never type by accident. Start keywords with a symbol, such as !email, ;;addr or /sig. Spaces, quotes and backticks can't be used in Raycast keywords.

Can I add today's date or my clipboard to a snippet?

Yes, with dynamic placeholders in Raycast Snippets. {date} inserts today's date, {clipboard} your last copied text, and {cursor} sets where the cursor ends up after the snippet expands.

Can I import snippets from TextExpander?

Yes. Export your snippets from TextExpander, aText, Espanso or PhraseExpress, then run Import Snippets in Raycast and select the file.

Why isn't my snippet expanding?

Check that Enable Snippet Expansion is on in Settings → Snippets and that Raycast has Accessibility access. Password fields and some apps, like terminals and virtual machines, block expansion. In those, paste the snippet from Search Snippets instead.

Expand text in any app with a few keystrokes. Try Raycast Snippets for free.

Download