Skip to content

Commit

Permalink
Merge pull request #492 from pieces-app/sublime-package
Browse files Browse the repository at this point in the history
add sublime docs
  • Loading branch information
mason-at-pieces authored Jul 21, 2024
2 parents 854cac1 + 423eabf commit 2d5ef0f
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/extensions-plugins/jetbrains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Using the Pieces for Developers JetBrains Plugin in combination with the Pieces

:::info

In order to use the Pieces JetBrains Plugin, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We recommend also using the Pieces for Developers desktop app.
In order to use the Pieces JetBrains Plugin, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We also recommend downloading the Pieces for Developers Desktop App.

:::

Expand Down
179 changes: 179 additions & 0 deletions docs/extensions-plugins/sublime.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
title: Pieces for Developers Sublime Plugin
description: Learn about the Pieces Sublime Extension, how it functions, and all you can do with the Sublime Plugin.
---

import { pieces_app } from "/src/lib/const";
import CTAButton from "/src/components/CTAButton";
import Video from "../../src/components/Video";
import { MiniSpacer } from "/src/components/Spacers";

# Pieces for Developers Sublime Text Plugin

<CTAButton
href={pieces_app.links.extensions.sublime}
label={'Get the Sublime Plugin'}
icon={'/assets/sublime_logo.png'}
type={'secondary'}
/>

<MiniSpacer />

The Pieces Sublime plugin is your gateway to managing your saved materials in Pieces directly from within Sublime Text. Seamlessly interact with Pieces OS and enhance your workflow like never before.

## Getting Started

### Installation

:::info

In order to use the Pieces Sublime Plugin, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We also recommend downloading the Pieces for Developers Desktop App.

:::

#### Stable Build (Recommended)

- Download the [package control](https://packagecontrol.io/installation)
- Open your command palette. You can use the shortcut key combination `Ctrl+Shift+P` on Windows and `Cmd+Shift+P` on macOS.
- Search for `Package Control: Install Package`
- Search for `Pieces` and select it.

:::tip

When you first download the package, it will download and install some required dependencies. As a result, you may need to restart Sublime for Pieces to load in.

:::

#### Pre-releases

You can download and checkout some new beta features before releasing.

- Make sure you have downloaded the [package control](https://packagecontrol.io/installation)
- Download the `Pieces.sublime-package` from [releases](https://github.com/pieces-app/plugin_sublime/releases) on GitHub
- Add `Pieces.sublime-package` to the Installed Packages directory.
- **Windows**: %APPDATA%\Sublime Text\Installed Packages
- **MacOS**: ~/Library/Application Support/Sublime Text 3/Installed Packages
- **Linux**: ~/.config/sublime-text/Installed Packages
- Open Sublime and enjoy the package

### Initial Setup

:::info

While connecting to your personal cloud provides additional features like generating shareable links, backing up your data, and more, it is not required to use Pieces. You can enjoy the core functionalities anonymously without an account.

:::

#### Login/Logout

You can log in and out of your Pieces account using the Pieces: Login or Pieces: Logout command in your command palette.

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/auth.gif'} alt={'Login/Logout in Sublime'} />

#### Connect or Disconnect your Personal Pieces Cloud

You can connect and disconnect from your personal cloud using `Pieces: Connect Personal Cloud` or `Pieces: Disconnect Personal Cloud` command in your command palette.

## Core Features

### Pieces Copilot

Get coding assistance from the Pieces Copilot. Ask for help with commenting, debugging, or generating snippets to save to Pieces with just a few clicks.

Open the command palette and select `Pieces: Copilot` to get started.

#### Ask Copilot in Sublime

You can ask Copilot in Sublime by using the command `Pieces: Copilot`. You can ask for help with commenting, debugging, or generating snippets to save to Pieces with just a few clicks.

#### Use Code Context with Copilot

You can also ask Copilot about the current project or file by using the commands:
- `Pieces: Ask about the current project`
- `Pieces: Ask about the current file`

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/ask.gif'} alt={'Ask Copilot in Sublime'} />

### Code Snippet Management

Manage your saved materials with ease. Save, open, edit, and share your snippets directly from Sublime. You can also search for saved materials using fuzzy search, full-text search, or neural code search.

#### Save to Pieces

Save your code snippets to Pieces with a simple right-click. Select the code you want to save, right-click to open the context menu, and choose `Pieces > Save to Pieces`. Your code is now safely stored!

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/create.gif'} alt={'Save to Pieces in Sublime'} />

#### Edit Saved Materials

Want to make changes to your saved materials? Switch to editor mode by clicking the **Edit** button on your saved snippet. Modify the content as needed and save your changes with a simple `command/ctrl + s`. It's that easy!

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/open-edit_snippet.gif'} alt={'Edit Saved Materials in Sublime'} />

#### Share Your Code

Ever wanted to share a code snippet effortlessly? Select the code, right-click to open the context menu, and choose `Pieces > Generate shareable link`. You can also share a saved material by opening it and clicking the **Share** button. Sharing has never been simpler!

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/share.gif'} alt={'Shareable Link in Sublime'} />

#### Search Your Saved Materials

You can search a saved material using `Pieces: Search`.

There are three main types of searching:

- **Fuzzy Search**: Fuzzy Search is a technique used to find matches that are likely to be relevant, even if they are not exact matches. It is particularly useful for handling typos, misspellings, and variations in data.

- **Full Text Search**: Full Text Search is a technique used to search for documents or records that contain the exact sequence of words in the search query. It indexes all the words in a document to enable fast and efficient searching.

- **Neural Code Search**: Neural Code Search is a technique that leverages neural networks and machine learning to improve the search and retrieval of code snippets. It allows you to use natural language to describe what you are looking for, capturing the semantics and context of the code to provide more accurate and relevant results.

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/search.gif'} alt={'Search Saved Materials in Sublime'} />

#### Open Your Saved Materials

Ready to access your saved materials? It's super easy! Just follow these steps:

1. Open your command palette (`Ctrl+Shift+P` or `Cmd+Shift+P`).
2. Run the command: `Pieces: Open Saved Material`.
3. Select the asset you wish to open from the list.

Your material is now open and ready for you to use. Happy coding!

#### Sublime Snippet Management

You can import and export Sublime snippets to and from Pieces. Here's how you can do it:

- **Import Sublime Snippet**: Use the command `Pieces: Import Sublime Snippet` to import a Sublime snippet into Pieces.
- **Export Pieces Material**: Use the command `Pieces: Export Pieces Material` to export a Pieces snippet into Sublime.

## Configuration

Before diving in, let's ensure everything is set up to your liking. You can customize settings like your active LLM model and many others by navigating to:
`Preferences > Package Settings > Pieces > Settings`.

> You can also open the settings from the command palette `Pieces: Open Settings`.
### Change Your LLM Model

Want to customize your Copilot experience? You can easily switch the LLM model to better suit your needs. Open the settings from your command palette by selecting `Pieces: Open Settings`. You can change some configuration and choose the model that works best for you. Tailor your Copilot to be the perfect coding companion!


## Troubleshooting

### Reload the Plugin

If you're experiencing an issue or something isn't working properly, try reloading the plugin using the command `Pieces: Reload Plugin` in your command palette. Don't forget to make sure Pieces OS is running.

### Get Support or Share Feedback

Experiencing an issue or have feedback for the Pieces team? No worries, we've got you covered. Simply open the command palette and run `Pieces: Get Support`. From here, you will find resources where you can connect with the Pieces team.

## Privacy and Data Collection

We take your privacy seriously. We are committed to ensuring that your data remains private and secure. To that end, we want to make it clear that:

**We do not collect any client side telemetry.**

[Read more about data collection and privacy](/product-highlights-and-benefits/privacy-security-data)

2 changes: 1 addition & 1 deletion docs/extensions-plugins/visual-studio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Using the Pieces for Developers Visual Studio Extension in combination with the

:::info

In order to use the Pieces Visual Studio Extension, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We recommend also using the Pieces for Developers desktop app.
In order to use the Pieces Visual Studio Extension, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We also recommend downloading the Pieces for Developers Desktop App.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/extensions-plugins/vscode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Using the Pieces for Developers VS Code Extension in combination with the Pieces
## Installing the Pieces for Developers VS Code Extension
:::info

In order to use the Pieces VS Code Extension, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We recommend also using the Pieces for Developers desktop app.
In order to use the Pieces VS Code Extension, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We also recommend downloading the Pieces for Developers Desktop App.

:::

Expand Down
1 change: 1 addition & 0 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Get started with the Pieces for Developers platform and show you how to best use
<CardWithoutCTA icon={'/assets/visual_studio_logo.png'} title={'Visual Studio'} href={'/extensions-plugins/visual-studio'} />
<CardWithoutCTA icon={'/assets/jupyterlab_logo.png'} title={'JupyterLab'} href={'/extensions-plugins/jupyterlab'} />
<CardWithoutCTA icon={'/assets/ads_logo.png'} title={'Azure Data Studio'} href={'/extensions-plugins/azure-data-studio'} />
<CardWithoutCTA icon={'/assets/sublime_logo.png'} title={'Sublime Text'} href={'/extensions-plugins/sublime'} />
</Grid>

## Web Browsers
Expand Down
5 changes: 5 additions & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ const sidebars: SidebarsConfig = {
id: 'extensions-plugins/visual-studio',
label: 'Visual Studio Extension',
},
{
type: 'doc',
id: 'extensions-plugins/sublime',
label: 'Sublime Plugin',
},
{
type: 'doc',
id: 'extensions-plugins/azure-data-studio',
Expand Down
1 change: 1 addition & 0 deletions src/lib/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const pieces_app = {
visual_studio: "https://marketplace.visualstudio.com/items?itemName=MeshIntelligentTechnologiesInc.PiecesVisualStudio",
obsidian: "https://obsidian.md/plugins?id=pieces-for-developers",
// obsidian: "obsidian://show-plugin?id=pieces-for-developers",
sublime: "https://packagecontrol.io/packages/Pieces",
edge: "https://microsoftedge.microsoft.com/addons/detail/pieces-save-code-snippet/hglfimcdgonaeeobjckfdabcldfidmim",
teams: "https://teams.microsoft.com/dl/launcher/launcher.html?url=%2F_%23%2Fl%2Fapp%2F789f23b3-d882-45ca-b3a3-de7f850656ea%3Fsource%3Dapp-details-dialog&type=app&deeplinkId=a5fe0a60-b3a1-42a2-9a57-a5ec71696573&directDl=true&msLaunch=true&enableMobilePage=true&suppressPrompt=true",
firefox: "https://addons.mozilla.org/en-US/firefox/addon/pieces-save-code-from-the-web/",
Expand Down
Binary file added static/assets/sublime_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/sublime/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 2d5ef0f

@vercel
Copy link

@vercel vercel bot commented on 2d5ef0f Jul 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.