Pieces for Developers | Sublime Plugin
Please make sure you have Pieces OS installed to run the Package.
Welcome to the Pieces Sublime Plugin!
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.
Before diving in, let's ensure everything is set up to your liking. You can customize the LLM model or the host by navigating to:
Preferences > Package Settings > Pieces > Settings
.
You can also open the settings from the command palette Pieces: Open Settings
.
Saving a new snippet in Pieces is a breeze! Just 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!
Ever wished for a personal coding assistant? Look no further! With Pieces Copilot, you can have an AI-powered assistant right at your fingertips. Simply open the command palette and select Pieces: Copilot
. From there, you can ask anything whether it's for coding help, debugging, or even generating snippets to save to Pieces with some clicks.
Need some help from the Pieces Copilot? Whether it's commenting, fixing a bug, or adding a docstring, just select the code, right-click to open the context menu, and choose Pieces > Ask Copilot
. Let Copilot do the heavy lifting for you!
- Ask About the Current Project: Use the command
Pieces: Ask about the current project
to get to be able to ask the Copilot on your Project. - Ask About the Current File: Use the command
Pieces: Ask about the current file
to get the current file that is in focus assistance.
- 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 back to Sublime.
Ready to access your saved materials? It's super easy! Just follow these steps:
- Open your command palette (
Ctrl+Shift+P
orCmd+Shift+P
). - Run the command:
Pieces: Open Saved Material
. - Select the asset you wish to open from the list.
Your material is now open and ready for you to use. Happy coding!
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!
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!
Auto-completion of code via snippets to speed up your coding process.If you have saved Pieces Snippets you get automatic completion via Pieces Snippets for specific language.
You can turn this settings on/off from your settings.
Open your settings from
Pieces: Open Pieces Settings
and overwrite thesnippet.autocomplete
to false to turn the auto-completion off
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!
You can log in and out of your Pieces account using the Pieces: Login
or Pieces: Logout
command in your command palette. An output panel is available to check your cloud status and login status.
You can connect and disconnect from your cloud using Pieces: Connect Personal Cloud
or Pieces: Disconnect Personal Cloud
command in your command palette.
Note: In order you use these commands, you must have an account connected to Pieces.
You can search a saved material using Pieces: Search
.
There are three main types of seaching:
-
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.
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.
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.
- Download the package control
- Open your command palette. You can use the shortcut key combination
Ctrl+Shift+P
on Windows andCmd+Shift+P
on MacOS. - Search for
Package Control: Install Package
- Search for Pieces and select it.
IMPORTANT: When you first download the package, it will download and install some required dependencies. As a result, you might need to restart Sublime after installing.
You can download and checkout some new beta features before releasing.
- Make sure you have downloaded the package control
- Download the
Pieces.sublime-package
from 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
Join our Discord Community
Become a part of our Discord community to stay updated and engage in discussions about our features.
Have an idea for a new feature? Feel free to submit your suggestions on our GitHub page.
Stay connected and up-to-date with our latest blogs.
Explore our collection of awesome Pieces plugins.
Don't forget to check out our YouTube channel for Power Tips & Best Practices
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.