- Installed copy of Sublime Text. Download at: https://www.sublimetext.com
- You are a Cacher user on the Pro or Team plan. Click here to view plans.
About the Cacher Package
This package for Sublime Text gives Cacher users the ability to perform popular actions on their personal and team snippet libraries.
- Open the Sublime Text Command Palette (Ctrl/Cmd+Shift+P) and enter the command Package Control: Install Package.
- Search for Cacher and install the package.
- From the Command Palette, execute Cacher: Setup.
- You'll be presented with an option to view credentials. Click Open Cacher. You can also navigate to the page via: app.cacher.io/enter?action=view_api_creds
- From the popped up webpage, sign up or sign in as a Cacher user.
- Once you are signed into Cacher, you should see a dialog on the top-right corner with your API KEY and API TOKEN values.
- Back in Sublime, enter your API key from step 5 into the input prompt.
- Next, enter your API token.
- You're all set! Open the Command Palette and type in Cacher: Insert Snippet to try inserting a snippet into your active editor.
Search for and insert a snippet file from your personal and team libraries.
The Insert Snippet command can be be launched from:
Create a snippet from either the text selection or the entire file (no selection). The command starts a wizard for you to choose:
- Personal or team library (if using teams)
- Description - Optional
- Public/private permission
- Label - Optional
Pro tip: You can create a single snippet from multiple files selected in the sidebar..
The Create Snippet command can be launched from:
Open Snippet in App
Find a snippet from your libraries and open it in the Cacher web app.
The Open Snippet in App command can be be launched from:
Open Snippet Page
Find a snippet from your libraries and open its Snippets page (example).
The Open Snippet Page command can be be launched from:
Reload your Cacher snippets. Do this once you've made a change to your snippets outside of Sublime.
The Refresh Snippets command can be be launched from:
Kick off the setup wizard to authenticate your Cacher account. Run this command if you need to switch users.
The Setup command can be be launched from:
This is the standard way to access Sublime commands. Use keyboard shortcut: Ctrl/Cmd+Shift+P.
The fastest way to access Cacher commands.
- Alt+Shift+I - Insert Snippet
- Alt+Shift+C - Create Snippet
- Alt+Shift+O - Open Snippet in App
- Alt+Shift+P - Open Snippet Page
- Alt+Shift+R - Refresh Snippets
While in an active editor, you can right-click the background to either Insert Snippet or Create Snippet.
With a text selection
- Insert Snippet will replace the selected text with the snippet file content.
- Create Snippet will create a snippet with the selected text as its file content.
Without a text selection
- Insert Snippet will insert the snippet file content at the caret.
- Create Snippet will create a snippet from the entire file's content.
Tab Context Menu
You can right-click on any tab in the window to trigger the Create Snippet command.
Select one or more files in the sidebar to send to the Create Snippet command. The new snippet will contain contents of the selected files.
Tools -> Cacher
Cacher adds a submenu to the Tools menu. You can find all the available commands here.