Pieces for Sublime Text Plugin



The Pieces for Sublime Text Plugin is a powerful tool that integrates directly into the Sublime Text editor. It allows users to manage saved code snippets and access Pieces Copilot features.

  • Pieces Copilot: Engage in AI-driven conversations to enhance productivity by generating code, adding comments, troubleshooting, and more—all contextualized to your project by adding files and folders as context.

  • Snippet Management: Effortlessly save, locate, and share frequently used code snippets, making it easier to organize your work, quickly access important pieces of code, and collaborate effectively with others.

Getting Started
Getting Started

Follow these instructions to download and install the Pieces for Sublime Text Plugin.

Troubleshooting
Troubleshooting

Explore troubleshooting options, navigate to our support page, or directly book a call with our engineers.


The Pieces for Sublime Text plugin offers developers two main pillars of functionality:

  1. Pieces Copilot: Offers AI-assisted features like starting contextualized generative AI conversations, adding code comments, and troubleshooting code

  1. Material Management: Enables you to save, edit, search, and share useful code snippets to boost your workflow productivity and streamline collaboration with others

Using the Pieces Copilot

Inside your Sublime Text Editor, Pieces Copilot enables you to perform various actions, such as initiating a conversation directly within the editor using your preferred LLM about a specific code snippet, fragment, or folder.

To start, you can initiate a conversation with the LLM of your choice, providing as much context as needed by adding files, folders, or even entire repositories to the conversation.

To explore available options, simply select a portion of your code, right-click, and hover over the Pieces item in the context menu. From here, you’ll find several quick actions, including:

  • Explain: Get detailed explanations of the code’s functionality.

  • Ask Copilot: Gives 3 options to fix a bug in your code, modify the selected code, or add comments to the selection.

  • Start Conversation About The Current Selection: Opens a new Copilot window to talk about your selected code.

Managing Code Snippets

Users can save snippets by right-clicking the selected code and choosing the Save to Pieces option, edit saved materials with a simple command, and share snippets via generated shareable links.

Commonly saved snippets include utility functions, database queries, and API request templates—these are frequently reused, so saving them streamlines development and keeps reusable code easily accessible.

Common snippet types include utility functions, API requests, and reusable code blocks.

When a snippet is saved, the plugin also automatically generates and associates meta data, like tags, commit messages, code types, smart descriptions, as well as code authors and related resources.

Searching for Snippets

There are 3 ways to search through your saved snippets in the Pieces for Sublime Text Plugin:

  • Fuzzy Search: Quickly find snippets even if your search term doesn’t match the saved text exactly. This is useful for locating snippets with slight variations in names or typos.

  • Full-Text Search: Searches through the entire content of your saved snippets. Ideal for when you remember part of the snippet but not the exact title or tags.

  • Neural Code Search: Uses AI to understand the context of your query, making it possible to find snippets even when your search term is related conceptually rather than textually. This is useful for complex searches where exact matches aren’t obvious.

These options allow you to search with vague queries or get specific when you know exactly what you’re looking for, so you can find and reuse your snippets.

Once you’ve located a snippet using one of the search methods, you can then refactor the code to your needs, share the code with other developers, or paste it directly into your code.


Download the Plugin

Ready to streamline your development? Download the Pieces for Sublime Text Plugin and follow our installation guide to start.

Updated on