SnipperAppSnipperApp 3

Your First Snippet

Create your first code snippet in SnipperApp 3.

Your First Snippet

This guide walks you through creating, editing, and organizing your first code snippet in SnipperApp 3.

Creating a New Snippet

There are several ways to create a new snippet:

From the Toolbar

  1. Click the + button in the toolbar, or press Cmd+N.
  2. A new untitled snippet is created in the currently selected folder.

From the Command Center

  1. Press Cmd+K to open the Command Center.
  2. Type "New Snippet" and press Enter.

From the Menubar

  1. Click the SnipperApp icon in the menu bar.
  2. Select New Snippet.

Editing Your Snippet

Once a new snippet is created:

  1. Title -- Click the title field at the top of the editor and give your snippet a descriptive name, such as "Python HTTP Request" or "Docker Compose Template".

  2. Language -- Select the programming language from the language dropdown. SnipperApp supports over 50 languages including JavaScript, Python, Swift, Go, Rust, TypeScript, SQL, Bash, and many more. The editor will apply syntax highlighting based on your selection.

  3. Write your code -- Click in the editor area and start typing or paste your code. The editor provides:

    • Syntax highlighting for the selected language
    • Line numbers
    • Word wrap (configurable)
    • Customizable font and line spacing

Here is an example snippet you might create:

import requests

def fetch_data(url: str, timeout: int = 30) -> dict:
    """Fetch JSON data from a URL with error handling."""
    try:
        response = requests.get(url, timeout=timeout)
        response.raise_for_status()
        return response.json()
    except requests.RequestException as e:
        print(f"Request failed: {e}")
        return {}

Organizing Your Snippet

Adding to a Folder

You can organize snippets into folders:

  1. Drag and drop the snippet from the snippet list into a folder in the sidebar.
  2. Or right-click the snippet and select Move to Folder, then choose the destination.

If you have not created any folders yet, right-click in the sidebar and select New Folder to create one.

Adding Tags

Tags provide flexible, cross-cutting categorization:

  1. Select your snippet in the list.
  2. In the snippet detail view, click the Tags area.
  3. Type a tag name to search for existing tags or create a new one.
  4. Tags can have custom colors for easy visual identification.

A single snippet can have multiple tags, making it easy to find later through different search paths.

Marking as Favorite

If this is a snippet you will use frequently:

  1. Select the snippet.
  2. Press Cmd+D to toggle the favorite status.
  3. The snippet will now appear in the Favorites section of the sidebar for quick access.

Copying Your Snippet

When you need to use your snippet:

  • Press Shift+Cmd+C to copy the snippet content to the clipboard.
  • From the menubar app, simply click the snippet to copy it.
  • You can also select specific lines in the editor and copy just the selection with Cmd+C.

What's Next

Now that you have created your first snippet, explore these topics:

  • Folders -- Build a folder hierarchy for your snippets.
  • Tags -- Create a tagging system for flexible organization.
  • Syntax Highlighting -- Learn about supported languages and themes.
  • iCloud Sync -- Sync your snippets across all your Macs.