Editing

Editing snippets and saving your changes is simple with the Pieces for Sublime Text Plugin.

How to Edit Snippets

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

  2. In the text field, type Pieces: Open Saved Materials.

  3. Search for your asset, or choose it drop the available assets listed in the dropdown.

  4. Left-click or press enter to select and open that snippet.

  5. Switch to the Editor Mode by clicking the Edit button on your saved snippet.

  6. Modify the content of the snippet as needed and save your changes with the ⌘+s (macOS) or ctrl+s (Windows / Linux).

Once you make your changes, saving your snippet will close the editing view and bring you back to the saved snippet's main tab.

Making Use of Additional Tools while Editing Snippets

When editing a snippet, the rest of Pieces Copilot functionality is fully available—such as adding code comments, starting conversations, and fixing bugs.

This means you can share a snippet with a coworker, receive feedback, then retroactively add code commentary and tweak some parameters or error handling to polish your code snippet.

Try this feature out by opening a saved snippet, editing it, and using the Pieces Copilot to add code comments, then saving it.

Updated on