Searching

You can find your saved code easily with the Pieces for Sublime Text Plugin by utilizing a few different search methods.


Finding Saved Snippets

One of the most powerful tools baked into the Pieces for Sublime Text Plugin is the search functionality which allows you to utilize three different searching methods.

To get started:

  1. Open the command palette using ⌘+shift+p (macOS) or ctrl+shift+p (Windows/Linux)

  2. Type Pieces: Search

Fuzzy Search helps find relevant matches even with typos, misspellings, or variations.

It’s great for locating partially-remembered function names, error messages, log entries, or comments, saving time with flexible, quick searches.

Full Text Search finds documents or records with an exact word match.

It indexes all words for fast searching, ideal for specific queries like function declarations, pulling up matching snippets and related classes efficiently.

Neural Code Search uses machine learning to find code snippets based on natural language descriptions.

It captures context and semantics, delivering accurate results, especially helpful for new developers or complex queries.

Viewing and Reusing Saved Snippets

Saved snippets can be viewed alongside their saved metadata by opening up them up directly from the command palette.

via Command Palette

  1. Open the Command Palette using ⌘+shift+p (macOS) or ctrl+shift+p (Windows/Linux)

  2. Type in Pieces: Open Saved Material to access your saved materials

  3. Scroll through the list to find the snippet you’d like to view

  4. Highlight the desired snippet and press return (macOS) or enter (Windows/Linux)

This opens up the snippet in markdown preview mode in a separate window. In the new window, you have the ability to share, view metadata, edit, copy, or delete the snippet.

Real Time Snippet Streaming

Each product in the Pieces Suite uses PiecesOS to get information about your snippets' context.

When you update a snippet in the Pieces for Developers Desktop App—such as a name or description, tags or any of the other metadata—those changes are also reflected in your Pieces for Sublime Text Plugin without refreshing.

If your snippets are not updating right away, see the troubleshooting guide for details on how to refresh your snippet list.

Updated on