IntelliJ Platform
This extension for IntellJ-based IDEs gives Cacher users the ability to perform popular actions on their personal and team snippet libraries.
Prerequisites
- Latest version of one of these IntelliJ-based IDEs:
- You are a Cacher user on the Pro or Team plan. Click here to view plans.
Getting started
- Sign up for a Cacher account at: app.cacher.io
-
To install the Cacher plugin for your IntelliJ IDE:
- Open your IDE preferences. info_outlineLearn more about managing plugins.
- Select Plugins from the side menu.
- Click on the Marketplace tab.
- Search for Cacher.
- Click the Install button for the Cacher plugin.
- You will be prompted to setup Cacher by entering your API token and key. You can find them here.
- Cacher will then load your snippets and make your code available to search.
Cacher main menu
Cacher adds an item to the top menu of your IDE. From here you can access any of the plugin's commands.
Finding snippets
Via the ToolWindow
- Cacher adds an entry to the bottom toolbar of your IDE. Click on it to open the Cacher ToolWindow.
- From here, select a library and/or enter a search query to filter your snippets.
- Double-click the snippet item in the list or use the Insert button on a snippet file to insert the code into your active editor.
Via find snippet dialog
Shortcut: Cmd/Ctrl Alt F
- Click the Cacher Main Menu item or use the keyboard shortcut.
- From the Find Snippet Dialog, select a library and/or enter a search query to filter your snippets.
- Double-click the snippet item in the list or use the Insert button on a snippet file to insert the code into your active editor.
Creating snippets
Shortcut: Cmd/Ctrl Alt C
Via create snippet dialog
- Without selecting any text, click the Cacher Main Menu item and select Create Snippet... to open the create snippet dialog.
- Enter a Title and an optional Description.
- Enter a Filename with a file extension (used for syntax highlighting).
- From the footer, select a Library and an optional Label.
- If your team enforces code reviews, you'll also need to pick a Code Reviewer.
- Click Save.
Via text selection
- With text selected in your active editor, right-click the selection to bring up the context menu.
- Select Create Snippet from Selection....
- Follow steps 4-6 from the Via create snippet dialog instructions above.
Via active editor tab
- With file open and no selected text, right-click the file's editor tab to open up the context menu.
- Select Create Snippet from File....
- Follow steps 4-6 from the Via create snippet dialog instructions above.
Refresh snippets
Reload your Cacher snippets once you've made a change to your snippets outside of your IDE. You can do this:
- Via the Cacher Main Menu.
- Or by clicking on the Refresh button in the Cacher ToolWindow.
Sign in as different user
To sign-out from the current Cacher user and in as a different user.
- Click the Cacher Main Menu item.
- Select Setup...
Change keyboard shortcuts
You can modify the shortcuts for the Find Snippet and Create Snippet commands to suit your personal needs. Configure them using the IntelliJ Keymap preferences.