MenuKeeping code / Tags

Docs / Keeping code

Tags

Tags file your Saved Snippets. Pick a Tag to see only the Saved Snippets that have it; pick two to narrow further.

On this page

A Tag is a word a Saved Snippet is filed under, such as dates or arrays. A Saved Snippet can have any number of them. The Tags are listed in the first column of the Library, each with how many Saved Snippets have it.

Starter Tags

A Saved Snippet also has the Tag of the Starter it began from: nodejs for Node.js, html for Web Page, react for React, and so on. This Starter Tag comes first, in a colour of its own, and Starter Tags come first in the Tag column.

The Starter Tags, nodejs and react, sit above your own Tags, in their own colour.

A Starter Tag isn’t yours to change: it can’t be edited, removed or renamed, and none of your own Tags can have its name. It still says where the Snippet came from after the Starter changes.

Filter by Tag

  1. Click a Tag in the Tag column. The list keeps only the Saved Snippets that have it.
  2. Click a second Tag to narrow the list further. It keeps only the Saved Snippets that have both.
  3. Click a picked Tag again to drop it, or click All to see every Saved Snippet.
nodejs and dates are both picked, so two Saved Snippets are left. The dimmed Tags would leave none.

The number beside each Tag is how many Saved Snippets would be left if you picked it too. A Tag that would leave none is dimmed. Tags and the search box work together.

Filtering by Tag works the same in JSpark and JSpark+.

Add and rename Tags JSpark+

Add Tags when you save a Snippet, in Add to Library, or later in the Library, under a Saved Snippet’s title.

  1. Click Add tag.
  2. Type a word. The field offers the Tags already in your Library that hold what you typed.
  3. Press Enter or type a comma. Leaving the field adds the word too.
Typing “da” offers dates, a Tag already in the Library.
  • Press Enter with nothing typed to take the first Tag offered.
  • Press Escape to drop what you typed.
  • Press Backspace in the empty field to remove the last Tag, or click the × on any Tag.

A Tag holds lowercase letters, digits and hyphens, up to 40 characters. Capitals become lowercase and other characters become hyphens, so Async Await becomes async-await. If nothing is left, the field says “A tag can hold lowercase letters, digits and hyphens.”

Rename a Tag

  1. In the Library’s Tag column, double-click the Tag.
  2. Type the new name, and press Enter. Press Escape to keep the old one.

The Tag is renamed on every Saved Snippet that has it. Starter Tags can’t be renamed.

In JSpark, you can filter by the Tags you have, but not add, remove or rename them: the app says “Saving to or editing the Library needs JSpark+”.

The pictures show JSpark on a Mac. On Windows, the window looks a little different and uses Ctrl for ⌘, but everything works the same way.

Esc

Type to search every docs page.