Docs / Keeping code
The Library
The Library keeps the Snippets you choose to save. Find one, open it in a tab, or copy its code.
On this page
A Saved Snippet is a copy of a Snippet, kept on purpose, with a title, notes and Tags. It also keeps its Kind, Language and Load Mode, so it opens as it was saved. The Library is where every Saved Snippet is.
Open the Library
Do one of these:
- Click Library on the rail, at the left of the editor.
- Press ⌘⇧L or Ctrl+Shift+L.
- Choose Window → Library.
The Library opens in its own window. The Tags are on the left, then the list. The Saved Snippet you picked fills the right: its title, notes, Tags and code.
Due date in 30 days
addDays, then format
Search the Library
Type in the search box above the list. The list keeps the Saved Snippets whose title, notes, Tags or code hold the words, and marks each match.
When the match is only in a Tag or in the code, the row shows that Tag or that line under the title, so you can see why it is in the list.
Due date in 30 days
addDays, then format
If nothing matches, the list says No matches and shows what is filtering it: the search and any Tags you picked. Click one to remove it.
Open, copy or delete a Saved Snippet
Pick a Saved Snippet in the list. The buttons at the bottom right of the window act on it:
- Copy code copies its code. The button says Copied! for a moment.
- Open in new tab opens a copy in a new tab in the editor window. Changes you make in the tab don’t change the Saved Snippet.
- Delete snippet (the bin) asks first: “Delete its title? This can’t be undone.” Click Delete to remove it from the Library.
Searching, opening, copying and deleting work the same in JSpark and JSpark+.
Save a Snippet JSpark+
- In the editor, click Add to Library (the bookmark on the rail), or choose File → Add to Library…
- Check the Title. It starts as the tab’s name.
- Add Notes if you want: what the Snippet is for.
- Add Tags. See Tags.
- Click Save, or press Enter in the Title.
The bookmark fills for a moment to show it was saved. Saving the same Snippet again makes a second Saved Snippet; it never replaces the first.
You can also start a Saved Snippet in the Library itself: click New snippet under the list and pick a Starter.
In JSpark, saving shows “Saving to or editing the Library needs JSpark+”. Everything already in the Library stays readable.
Edit a Saved Snippet JSpark+
Edit a Saved Snippet where you read it, in the Library window: its title, notes, Tags, code and Language. There is no Save button. Each change is kept as you make it.
In JSpark, a Saved Snippet can’t be changed: its code is read-only. You can still select and copy it, or open it in a tab and change it there.
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.