Editing
Editing snippets and saving your changes is simple with the Pieces for JetBrains Plugin.
How to Edit Snippets
There are several types of metadata you can edit when editing saved materials—as well as the saved piece of code itself.
To edit a snippet:
-
Select the snippet in the Pieces tool window on the left side of the screen
-
Press
⌥+⏎
(macOS) oralt+enter
(Windows/Linux) OR right-click and selectEdit
from the pop-up menu -
Make your changes, then save using
⌘+s
(macOS) orctrl+s
(Windows/Linux)
Editing Snippet Metadata
You also can adjust the snippet’s name, description, and classification from the right-click context menu.
To do this, right-click a snippet in the Pieces toolbar and select any of the available options that suit your needs:
Table of Editable Metadata
You can find a list of all adjustable and editable pieces of metadata in the table below.
Action | Description | Command |
---|---|---|
Rename | Change the name of the snippet, which will be reflected throughout your Pieces repository, even in other IDEs. | via right-click menu, or |
Edit Description | Change the description of the snippet—also reflected when viewing the snippet’s metadata from any other IDE in your Pieces repository. | via right-click menu, or |
Reclassify | Change the automatically-detected language of the snippet. This will affect where the snippet lives which folder it is listed under when working with related snippets in any JetBrains IDE. | via right-click menu, or |
Delete | Deletes the snippet from your Pieces repository. | via right-click menu, or |