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:

  1. Select the snippet in the Pieces tool window on the left side of the screen

  2. Press ⌥+⏎ (macOS) or alt+enter (Windows/Linux) OR right-click and select Edit from the pop-up menu

  3. Make your changes, then save using ⌘+s (macOS) or ctrl+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 shift+F6

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 ⌘+d (macOS) or ctrl+d (Windows/Linux)

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 F6

Delete

Deletes the snippet from your Pieces repository.

via right-click menu, or delete key (macOS/Windows/Linux)


Updated on