a blog on sparkly devops.

Working With Gists Within Sublime

Sublime is a pretty sweet editor in combination with the Sublime package manager. Today, I learned about the Gist package add-on. Gists are a way to share work. Every gist is a git repository which means that it can be forked and cloned in the same ways. Gists can be public or secret. Public gists are searchable; secret gists are not, but they are accessible by anyone with the URL. Most of the time, I use gists for training classes to assign IPs, as well as snippets of code.

After installing the package, to interact with Github’s gist repository generate a new token on Github. You can also configure the settings to use Enterprise Git.

All of the commands to interact with Gist require 2 key combinations by default. With the Gist package add-on on OS X, Command + K is the first key combination. The second is dependent on the desired action. Command + K followed with Command + O will open up a list of available gists. Double clicking opens up a new window in sublime with the content.

To save the gist, it’s more than just saving the file in Sublime, it requires the key combo of Command + K Command + S.