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.
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.
Due date in 30 days
addDays, then format
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
- Click a Tag in the Tag column. The list keeps only the Saved Snippets that have it.
- Click a second Tag to narrow the list further. It keeps only the Saved Snippets that have both.
- Click a picked Tag again to drop it, or click All to see every Saved Snippet.
Due date in 30 days
addDays, then format
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.
- Click Add tag.
- Type a word. The field offers the Tags already in your Library that hold what you typed.
- Press Enter or type a comma. Leaving the field adds the word too.
- 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
- In the Library’s Tag column, double-click the Tag.
- 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.