# Snippets

> Platforms: Mac, Windows, iOS

Store and auto-expand text snippets from Raycast. Type a keyword in any app to instantly paste templates, code, addresses, signatures, and more.

Snippets let you store frequently used text and insert it anywhere on your computer with just a few keystrokes. Whether it's email templates, code blocks, addresses, or emoji sequences, Snippets save you from typing the same things over and over. In v2, Snippets gain support for tagging and a new `{calculator}` [dynamic placeholder](https://manual.raycast.com/dynamic-placeholders).

> [!TIP]
> Open Snippets by searching for "Search Snippets" or "Create Snippet" in Root Search, or assign a hotkey for instant access.

## Creating a Snippet

To create a new Snippet:

1. Open Raycast and search for **Create Snippet**
2. Enter the text you want to save in the **Snippet Text** field. This can be plain text, formatted content, code, or any text you type repeatedly.
3. Give your Snippet a **Name** so you can find it later.
4. Optionally assign a **Keyword** to enable auto-expansion (see below).
5. Optionally add **Tags** to organize your Snippets into groups.

> [!NOTE]
> Snippet text has a maximum length of 65K characters. This limit exists for performance reasons — in practice, most Snippets are well within this range.

## Keywords & Auto-Expansion

Keywords are the real power behind Snippets. When you assign a keyword to a Snippet, typing that keyword in any application automatically replaces it with the full Snippet text. This works everywhere: in your browser, code editor, email client, chat apps, and more.

### How Auto-Expansion Works

1. Assign a keyword to your Snippet (e.g., `!email`, `;;addr`, `/sig`)
2. Type the keyword in any text field on your computer
3. Raycast automatically replaces the keyword with your Snippet text

> [!TIP]
> Choose keywords that are unlikely to be typed accidentally. Prefixes like `!`, `;;`, or `//` work well. For example, `!thanks` is safer than just `thanks`.

### Auto-Expansion Settings

You can enable or disable auto-expansion globally in **Raycast Settings → Snippets**. When disabled, Snippets still work — you just need to search for them in Raycast and paste manually instead of using keyword triggers.

{/* TODO: add screenshot — apps/raycast/public/images/app/core-features/snippets/mac-snippets-autoexpansion-settings.png */}

### Keyword Character Reference

Not all characters can be used in keywords. Raycast uses certain characters as word-boundary delimiters, which means they will trigger expansion rather than become part of the keyword itself.

**Characters that cannot be used in keywords:**

- **Backtick**: `` ` ``
- **Quotation marks**: single quote `'`, double quote `"`, and their curly/smart variants `' ' " "`
- **Whitespace**: spaces, tabs, and newlines
- **Other delimiters**: some additional punctuation characters act as word boundaries and will trigger expansion instead of being included in the keyword

**Characters that can be used in keywords:**

- **Letters**: all Unicode letters (Latin, Cyrillic, CJK, etc.)
- **Numbers**: `0–9`
- **Hyphen & underscore**: `-` and `_`
- **Math symbols**: such as `+ = < >`
- **Currency symbols**: `$ € £ ¥` and others
- **Most punctuation**: including `! ; / . , @ # ~ &` (except the restricted characters listed above)

> [!TIP]
> Keywords like `!email`, `;;addr`, `/sig`, and `$price` are all valid. Keywords like `my email` (contains a space) or `it's` (contains an apostrophe) are not, because the space and quote act as delimiters.

## Searching & Managing Snippets

The **Search Snippets** command gives you a central view of all your Snippets. From here you can:

- Search by name, keyword, or content
- Filter by tag to quickly narrow down your collection
- Copy a Snippet to your clipboard
- Paste a Snippet directly into the active application
- Pin frequently used Snippets to the top of the list
- Edit, duplicate, or delete Snippets

## Dynamic Placeholders

Snippets support [dynamic placeholders](https://manual.raycast.com/dynamic-placeholders) — special tokens that are replaced with live data when the Snippet is expanded. This lets you create context-aware Snippets that adapt every time you use them.

### Available Placeholders

Here are some commonly used dynamic placeholders:

- `{date}`: inserts the current date
- `{time}`: inserts the current time
- `{day}`: the current day of the week
- `{clipboard}`: pastes the current clipboard contents
- `{cursor}`: positions your cursor at this point after expansion
- `{random}`: generates a random UUID

<Highlight type="new" /> A new `{calculator}` [dynamic placeholder](https://manual.raycast.com/dynamic-placeholders) is now available. It evaluates a math expression inline when the Snippet is expanded. For example, a Snippet containing `Total: {calculator expression="100 * 1.19"}` would output `Total: 119`. This placeholder is also available in Quicklinks and AI Commands.

### Date & Time Formatting

Date and time placeholders support custom formatting. You can specify a format string using standard date patterns:

- `{date: YYYY-MM-DD}` → `2026-04-01`
- `{date: MMM D, YYYY}` → `Apr 1, 2026`
- `{time: HH:mm}` → `14:30`

You can also use date math to reference relative dates, such as `{date+1d}` for tomorrow or `{date-7d}` for a week ago.

## Tags

<Highlight type="new" /> Snippets now support tagging. Tags let you organize your Snippets into logical groups — for example, by project, language, client, or purpose. You can assign one or more tags when creating or editing a Snippet, and then filter by tag in the Search Snippets view to quickly find what you need.

To add a tag:

1. Open the Snippet editor (create a new Snippet or edit an existing one)
2. Use the **Tags** field to assign one or more tags
3. Type a new tag name to create it, or select from existing tags

In the Search Snippets view, use the tag filter dropdown to show only Snippets with a specific tag. This makes it easy to manage large Snippet collections.

## Shared Snippets (Teams)

With Raycast for Teams, you can create shared Snippets that are available to everyone on your team. This is ideal for maintaining consistent messaging: support responses, company boilerplate, onboarding templates, and more.

Shared Snippets are managed from the same Search Snippets interface. They appear alongside your personal Snippets and can be filtered separately. Team admins can manage shared Snippets from the Raycast Teams dashboard.

## Importing Snippets

Raycast supports importing Snippets from other text expansion tools and from CSV files. To import:

1. Open Raycast and search for **Import Snippets**
2. Select your source file (CSV or a supported export format)
3. Review the imported Snippets and confirm

This makes it easy to migrate from tools like TextExpander, aText, Espanso, or PhraseExpress without losing your existing library.

## Use Cases & Examples

Here are some practical ways to use Snippets:

- **Email signatures**: Keyword `!sig` expands to your full signature with name, title, and contact info
- **Meeting notes template**: Keyword `!notes` expands to a structured template with `{date}` and `{cursor}` placeholders
- **Code snippets**: Keyword `;;log` expands to `console.log({cursor})`
- **Support replies**: Tag your customer support responses and quickly filter by client or issue type
- **Emoji combos**: Keyword `!shrug` expands to `¯\_(ツ)_/¯`

## Troubleshooting

If Snippets aren't working as expected, here are some common issues and steps to resolve them.

<details>
<summary>Snippets aren't expanding when I type the keyword</summary>
- Make sure auto-expansion is enabled in **Raycast Settings → Snippets**.
  - <Platform platform="mac" /> Check that Raycast has Accessibility permissions enabled in **System Settings → Privacy & Security → Accessibility**.
  - Verify your keyword doesn't contain invalid characters (see the Keyword Character Reference above). Characters like quotes, backticks, and spaces will prevent the keyword from working.
  - Some apps with custom text input fields (e.g., certain code editors or terminal emulators) may not support auto-expansion. Try pasting the Snippet manually from the Search Snippets command instead.
</details>

<details>
<summary>Snippet text is pasted incorrectly or partially</summary>
- If the expanded text appears garbled or incomplete, the target app may be interfering with the paste operation. Try increasing the paste delay or switching to a different paste method in Snippet settings.
  - Ensure your Snippet text is within the 65,536 character limit.
</details>

<details>
<summary>Dynamic placeholders aren't being replaced</summary>
Double-check the placeholder syntax. Placeholders must use curly braces, e.g., `{date}`, `{clipboard}`. A typo in the placeholder name will cause it to be inserted as plain text.
</details>

<details>
<summary>Still having issues?</summary>
If none of the steps above resolve your issue, please reach out to our support team. To help us diagnose the problem quickly, include the following:

  1. **A screen recording** showing the issue in action. On macOS, press <PlatformKey mac="⌘" windows="Ctrl" /> `⇧` `5` to open the screen recording tool. On Windows, press `Win` + `Alt` + `R` to start recording with the Xbox Game Bar, or use the Snipping Tool.
  2. **The name and keyword** of the Snippet that isn't working.
  3. **The app** where you're trying to use the Snippet (e.g., Chrome, VS Code, Slack, Notion).
  4. **Your OS version** and **Raycast version** (found in **Raycast Settings → About**).
  5. **Your Raycast logs**: Use the built-in **Copy Raycast Logs** command to copy your latest log files to the clipboard, or **Reveal Raycast Logs** to open your log folder. Search for either command in Raycast.
</details>


---

## Need Help?

Contact Raycast Support if you have any questions or would like help with Snippets. Use the **Send Feedback** command directly in Raycast to report bugs and billing issues, log feature requests, or any other queries you would like to speak to us about.

You can view all Raycast Support contact options at https://manual.raycast.com/contact-support
