Snippet Pages, VSCode, CLI and Themes

Rui Jiang
Rui Jiang
Apr 18, 2018 · 4 min read

It has been a busy few months at Cacher. In additional to squashing bugs and responding to feature requests, we’ve been working toward longer-term goals. We built Cacher to be the central library for your code snippets. But that doesn’t mean it has to operate in a vacuum. Pro developers use a multitude of tools to get things done, from IDEs to code linters to desktop enhancements and team chat apps. We want to be tightly integrated with your everyday development experience, wherever that may take place.

These features below, all released in the last two months, make solid strides toward enhancing everyday productivity for developers.

Snippet Pages / snippets.cacher.io

While some snippets are personal and applicable only in a specific context, others are meant to be shared with colleagues and the wider coding community. We built Snippet Pages as a great way to share snippet content and to discover contributions from other Cacher users.

At the top of every snippet in Cacher, you will see a SHARE PAGE control. This has the URL to a web-accessible page for your snippet. By default, public snippets are shared with everyone while private snippets are visible only to you and your teammates.

Example of a Snippet Page

Visual Studio Code Extension / Marketplace

Cacher for VSCode is our first code editor extension. We picked Visual Studio Code to tackle first due to its nicely documented API and general popularity with developers.

Creating and inserting a snippet

Installing the extension gives you the following commands under the Cacher: namespace:

  • Insert Snippet (Alt+Shift+I): Search for and insert a snippet file from your personal and team libraries. Searches across snippets’ title, description and file content.
  • Create Snippet (Alt+Shift+C): Create a snippet from either the selected text or from the entire file contents (no selection).
  • Open Snippet in App (Alt+Shift+O): Find a snippet from your libraries and open it in the Cacher web app.
  • Open Snippet Page (Alt+Shift+P): Find a snippet from your libraries and open its Snippets Page.
  • Refresh Snippets (Alt+Shift+R): Reload your Cacher snippets. Do this once you’ve made a change to your snippets outside of VSCode.
  • Setup: Kick off the setup wizard to authenticate your Cacher account. Run this command if you need to switch users.

You can also right-click on an active editor to view Cacher context menu actions. From here, you can Create Snippet from the selected text (uses the entire file if no text is selected) or Insert Snippet at the cursor position.

Cacher additions to the VSCode context menu

Command-Line Interface (CLI) / GitHub

The beta version of Cacher CLI is an open-source command-line interface for interacting with your personal and team libraries. The v0.1.0 release features the snippets:add command, which creates a new snippet from clipboard contents or from a file on your system.

Demo of the snippets:add command

With the CLI, you have the power to:

  • Write batch scripts to add snippets to your personal or team libraries
  • Import snippets from system files or an arbitrary source
  • Fork the repo and write your own custom CLI for Cacher

Themes

Many devs prefer a dark interface to ease the strain of looking at small text all day long. With Cacher themes, users now have a way to customize the interface to match their visual preferences. We started with Big Stone (default light theme) and Monokai but have since added Tomorrow and Solarized Dark.

Try it out: User Dropdown > Personal Settings > Themes.

Previewing themes

What should we work on next?

So what do you think about these new features? How can we improve them? What should we build in the coming weeks? Leave a comment below, reach us on Twitter/Facebook or email your suggestions to support@cacher.io.

Cacher is a code snippet organizer for pro developers. Try it at cacher.io.

Cacher App

The code snippet organizer for professional developers

Rui Jiang

Written by

Rui Jiang

Founder of Cacher, Human Penguin

Cacher App

The code snippet organizer for professional developers

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade