- Installed copy of Visual Studio Code. Download at: https://code.visualstudio.com
- You are a Cacher user on the Pro or Team plan. Click here to view plans.
About the Cacher Extension
This extension for VSCode gives Cacher users the ability to perform popular actions on their personal and team snippet libraries.
- Install the Cacher extension.
- You will be prompted to setup Cacher. Click the Setup Cacher button. (You can also start the setup wizard by using the Cacher: Setup command.)
- In the prompt to "Open Cacher to view your user credentials", click View credentials. 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 VSCode, enter your API key from step 5 into the input prompt.
- Next, enter your API token.
- You're all set! Open the VSCode Command Palette and type in Cacher: Insert Snippet to try inserting a snippet into your active editor.
Pro tip: Your credentials are saved in
.cacher/credentials.json under your OS's home folder. This file is also used to authenticate other apps, like the Cacher CLI, Atom Package and Sublime Text Package.
Search for and insert a snippet file from your personal and team libraries. Searches across snippets' title, description and file content.
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
- Labels - Optional
Open Snippet in App
Find a snippet from your libraries and open it in the Cacher web app.
Open Snippet Page
Find a snippet from your libraries and open its Snippets page (example).
Reload your Cacher snippets. Do this once you've made a change to your snippets outside of VSCode.
The extension auto-refreshes once every hour.
Kick off the setup wizard to authenticate your Cacher account. Run this command if you need to switch users.
Right-click on an active editor to bring up Cacher context menu actions. You can Create Snippet from the selected text (uses the entire file if no text selected) or Insert Snippet at the cursor position.
Status Bar Item
Click on </> Snippets in the VSCode footer to view all available commands.
Change Keyboard Shortcuts
Cacher's default shortcuts can be configured via the Keyboard Shortcuts editor (File > Preferences > Keyboard Shortcuts).