Editing

Maintaining an up-to-date library of code snippets in the Pieces for Sublime Text Plugin is made easy through seamless editing.

How to Edit Snippets

To modify an existing snippet, follow these steps:

Open the command palette using `⌘+shift+p` (macOS) or `ctrl+shift+p` (Windows/Linux) In the text field, type `Pieces: Open Saved Materials` Search for your asset, or choose it drop the available assets listed in the dropdown Left-click or press enter to select and open that snippet Switch to the **Editor Mode** by clicking the `Edit` button on your saved snippet Modify the content of the snippet as needed and save your changes with the `⌘+s` (macOS) or `ctrl+s` (Windows/Linux)
<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/sublime_text_plugin_assets/using_snippets/using_snippets_PARENT_PAGE/commenting_editing_snippet.gif" alt="" align="center" fullwidth="true" />

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

Actions from the Editing View

When editing a snippet, you can use all Pieces Copilot features, like adding comments, starting conversations, and fixing bugs, allowing you to share it with a coworker, get feedback, and then refine the snippet by adding comments and adjusting parameters or error handling.