Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions public/content/_deprecated/extensions-plugins/sublime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: Sublime Text Plugin
path: /extensions-plugins/sublime
visibility: PUBLIC
status: PUBLISHED
description: Discover the Pieces for Sublime Text Plugin and bring the power of Pieces to your favorite
metaTitle: Using the Pieces for Sublime Text Plugin | Pieces Docs
metaDescription: Enhance Pieces with the Sublime Text Plugin. Save, manage, and reuse code snippets seamlessly for faster development.
ogImage: "https://storage.googleapis.com/hashnode_product_documentation_assets/og_images/plugins_extensions/sublime.png"
_deprecated: true
_deprecated_note: Not in nav. Use the MCP docs and CLI docs for current integration options.
---

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/og_images/plugins_extensions/sublime.png" alt="" align="center" fullwidth="true" />

***

<Callout type="info">
We're phasing out individual plugin docs. Use the [MCP docs](/products/mcp/get-started) and [CLI docs](/products/cli) for current integration options.
</Callout>

***

## Pieces for Sublime Text Plugin

The <a target="_blank" href="https://packagecontrol.io/packages/Pieces">Pieces for Sublime Text Plugin</a> is a powerful tool that integrates directly into the Sublime Text editor. It allows users to manage saved code snippets and access [Pieces Copilot](/products/extensions-plugins/sublime/copilot) features.

* [Pieces Copilot:](/products/extensions-plugins/sublime/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.

* [Pieces Drive](/products/extensions-plugins/sublime/drive): Effortlessly save, locate, and share frequently used code snippets to the Pieces Drive—making it easier to organize your work, quickly access important pieces of code, and collaborate effectively with others.

<CardGroup cols={2}>
<Card title="Getting Started" image="/assets/icons/sublime.png">
[Follow these instructions](/products/extensions-plugins/sublime/get-started) to download and install the Pieces for Sublime Text Plugin.
</Card>

<Card title="Troubleshooting" image="/assets/icons/platform_logos/pieces_logo.png">
Explore [troubleshooting options,](/products/extensions-plugins/sublime/troubleshooting) navigate to our [support page,](/products/support) or <a target="_blank" href="https://calendar.app.google/WVUDtUfNy5Vst3sH7">directly book a call</a> with our engineers.
</Card>
</CardGroup>

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

1. **Pieces Copilot**: Offers [AI-assisted features](/products/extensions-plugins/sublime/copilot) like contextualized generative AI conversations, adding code comments, and troubleshooting code

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/sublime_text_plugin_assets/sublime_text/about_current_selection.png" alt="" align="center" fullwidth="true" />

2. **Pieces Drive**: Enables you to [save, edit, search, and share useful code](/products/extensions-plugins/sublime/drive) snippets to boost your workflow productivity and streamline collaboration with others

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/sublime_text_plugin_assets/sublime_text/save_to_pieces.png" alt="" align="center" fullwidth="true" />

## 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](/products/extensions-plugins/sublime/copilot/chat), 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.

* `Quick Actions`: Gives 3 options to fix a bug in your code, modify the selected code, or add comments to the selection.

- `Ask Copilot`: Gives you 2 options to ask the copilot about the selected code or to explain the selected code to you.

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/sublime_text_plugin_assets/sublime_text/chatting_with_selection.gif" alt="" align="center" fullwidth="true" />

## Using Pieces Drive

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 materials 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.**

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/cdn_migrate_repair_2/sublime_associated_context.webp" alt="" align="center" fullwidth="true" />

### Referencing & Reusing

There are 3 ways to [search through your saved snippets](/products/extensions-plugins/sublime/drive/search-reuse) 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.

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/cdn_migrate_repair_2/reference_and_reuse.webp" alt="" align="center" fullwidth="true" />

***

## Download the Plugin

Ready to streamline your development? Download the <a target="_blank" href="https://packagecontrol.io/packages/Pieces">Pieces for Sublime Text Plugin</a> and follow our [installation guide to start.](/products/extensions-plugins/sublime/get-started)
61 changes: 61 additions & 0 deletions public/content/_deprecated/extensions-plugins/sublime/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Pieces for Sublime Text Plugin Commands
path: /extensions-plugins/sublime/commands
visibility: PUBLIC
status: PUBLISHED
metaTitle: "Using Pieces for Sublime: Essential Commands & Shortcuts"
metaDescription: Explore the full list of available commands in the Pieces for Sublime Text Plugin for improved workflow efficiency.
description: Below is a table containing every command available to use in the Pieces for Sublime Text Plugin.
---

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/sublime_text_plugin_assets/commands/commands_opened_command_palette_10182024.png" alt="" align="center" fullwidth="true" />

## Shortcut Table

There are a number of actions related to the [Pieces Copilot](/products/extensions-plugins/sublime/copilot) and [Pieces Drive management ecosystem](/products/extensions-plugins/sublime/drive) that are accessible with shortcuts.

***

| [Pieces: Ask About The Current Project](/products/extensions-plugins/sublime/copilot/chat#pieces-ask-about-the-current-project) | `⌘+shift+i` | `ctrl+shift+i` |
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ------------------ |
| [Pieces: Search](/products/extensions-plugins/sublime/drive/search-reuse) | `⌘+⌥+shift+s` | `ctrl+alt+shift+s` |
| [Pieces: Copilot](/products/extensions-plugins/sublime/copilot) | `⌘+⌥+shift+o` | `ctrl+alt+shift+o` |
| [Fix a bug](/products/extensions-plugins/sublime/copilot/debugging-errors) | `⌘+⌥+shift+f` | `ctrl+alt+shift+f` |
| [Modify](/products/extensions-plugins/sublime/copilot/refactoring) | `⌘+⌥+shift+m` | `ctrl+alt+shift+m` |
| [Add Code Comments](/products/extensions-plugins/sublime/copilot/documenting-code) | `⌘+⌥+shift+c` | `ctrl+alt+shift+c` |

***

## Command Table

You can easily access these commands through the **Command Palette** using the shortcuts—`⌘+shift+p` (macOS) and `ctrl+shift+p` (Windows/Linux).

Simply type `Pieces:` followed by the desired command to filter and locate it in the list.

***

| **Pieces: About** | View plugin details and PiecesOS version. |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **Pieces: Copilot** | Create conversations, view past ones, or ask questions. |
| **Pieces: Login** | Opens the PiecesOS login page in your browser. |
| **Pieces: Search** | Perform neural, full-text, or fuzzy search. |
| **Pieces: Change LLM** | Allows you to change the LLM to any LLM supported by PiecesOS. |
| **Pieces: Get Support** | Access support options: file issues, join Discord, or visit the support site. |
| **Pieces: Launch Onboarding** | Opens the onboarding file post-installation. |
| **Pieces: Reload Plugin** | Reloads the plugin for troubleshooting. |
| **Pieces: Delete Copilot Chat** | Deletes the current Pieces Copilot chat. |
| **Pieces: Install PiecesOS** | If PiecesOS is not found on your local machine, this command will take you the route of installing it. |
| **Pieces: Open Pieces Drive** | Opens materials found withing Pieces Drive. |
| **Pieces: Enable Long-Term Memory** | Enables the LTM-2.7 allowing you to actively capture what’s happening on your computer to grant the Copilot better answering. |
| **Pieces: Pause Long-Term Memory** | Completely disables Long-Term Memory LTM-2.7. |
| **Pieces: Connect Personal Cloud** | Connect to your Pieces cloud account. |
| **Pieces: Disconnect Personal Cloud** | Disconnect from your Pieces cloud account. |
| **Pieces: Export Pieces Material** | Export a saved snippet via dropdown selection. |
| **Pieces: Import Sublime Snippet** | Import Sublime snippets into Pieces materials. |
| **Pieces: Open PiecesOS** | Launches PiecesOS (required for the plugin). |
| **Pieces: Open Pieces Settings** | Configure settings, LLM models, and snippet autocomplete. |
| **Pieces: Open Saved Material** | Browse and manage saved snippets with metadata and editing tools. |
| **Pieces: Ask About The Current File** | Ask questions about the file you're working on. |
| **Pieces: Ask About The Current Project** | Inquire about your project files for better insights. |

***
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: Configuration
path: /extensions-plugins/sublime/configuration
visibility: PUBLIC
status: PUBLISHED
description: Read the guide below to configure the Pieces for Sublime Text Plugin to work efficiently in your workflow and adapt to your preferences.
metaTitle: How to Configure the Pieces for Sublime Extension
metaDescription: Configure Pieces for Sublime Text to match your coding preferences and workflow requirements.
---

## Supported LLMs

We constantly update and configure our plugins and extensions, like the Pieces for Sublime Text Plugin, to [work with the latest LLMs.](/products/large-language-models)

## Opening Pieces Settings

To open Pieces settings inside of the Pieces for Sublime Text Plugin, you can use `⌘+shift+p` (macOS) or `ctrl+shift+p` (Windows/Linux) to open the command palette.

Then, enter `Pieces: Open Pieces Settings`.

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/sublime_text_plugin_assets/configuration/open_pieces_settings.gif" alt="" align="center" fullwidth="true" />

## Login / Logout

Use the `Pieces: Login` or `Pieces: Logout` command in your command palette to log in and out of your Pieces account.

<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/cdn_migrate_repair_2/sublime_login_logout.png" alt="" align="center" fullwidth="true" />

***

## Configurable Settings

The Pieces for Sublime Text Plugin offers customizable settings to tailor your experience. These options let you configure the connection, language model, startup behavior, and code autocompletion. Here's an overview of the key settings:

***

| `host` | Specifies the address where the plugin should connect to a local service or server. |
| ---------------------- | -------------------------------------------------------------------------------------------------- |
| `model` | Determines which large language model to use for all Pieces Pilot functionality. |
| `syntax` | Let’s you adjust your language extension. |
| `auto_start_pieces_os` | Lets you decide whether or not to open PiecesOS automatically on startup. |
| `Copilot` | Allows you to choose whether to open the Copilot in the browser or IDE. |
| `auto_check_updates` | Gives you the ability to enable or disable PiecesOS from auto updating. |
| `snippet.autocomplete` | Decide whether or not to enable auto-completion of code via suggest snippets from your repository. |

***

To change settings, you need to copy and paste the contents of the default settings file into the empty window on the right side, which you can find below:

```json
{
"model":"gpt-4o", // Deprecated use "Pieces: Change LLM" instead
"auto_start_pieces_os":true, // Open PiecesOS automatically on startup
"snippet.autocomplete":false, // auto complete via Pieces saved snippets or not
"syntax" : {}, // Langauge extension : syntax path
"copilot" : "IDE", // IDE, BROWSER
// Opens the copilot either in browser or in the sublime IDE it self
"auto_check_updates": true // Check if Pieces for Sublime plugin has an update on startup
// Turn this off if Package Control is working fine
}
```

### Pieces Auto-Launch on Startup

You can choose whether or not PiecesOS starts immediately on the launch of the Sublime text editor by setting the parameters to `true` or `false.`

### Snippet Auto-Complete

Similarly, adjust the parameters to `true` or `false` to enable auto-completion of code via snippets to speed up your coding progress.

If you have Pieces snippets saved that are relevant to the code you're writing, you'll get automatic completion for that specific language.

### Reloading the Plugin

To reload the plugin, enter the command palette with `⌘+shift+p` (macOS) or `ctrl+shift+p` (Windows/Linux) and type `Pieces: Reload Plugin`.

For additional support resources, [check out our troubleshooting guide.](/products/extensions-plugins/sublime/troubleshooting)

## Saving Your Settings

Once you've copied the contents of the .JSON object and edited them to your preferences, simply save the file, reload the plugin, and restart Sublime for your changes to take effect.

<Callout type="info">
You can save the .JSON file with `⌘+s` (macOS) or `ctrl+s` (Windows / Linux). You do not need to use **Save As,** as the file is already existing and this is simply updating the settings file, which comes with the Pieces for Sublime Text package.
</Callout>
Loading
Loading