Github gists are a great way to share snippets of code with others or store them for private use. We all have some code chunks that we use often but that are not easy to keep in memory. In order to create a new gist, I used to log in to my Github account and use their online editor. But now, thanks to this Sublime Text plugin: Gist, I can do that from the comfort of my favorite editor.

To be able to use Gist, just do the following:

Install the plugin using Package Control.

Log in to your Github account.

Generate a new access token from here, under Personal access tokens.

Copy the token,

In Sublime Text, go to Preferences > Package Settings >Gist >Settings – Default

Paste the token in front of “token”.

Now, select any text, right-click and you’ll find 2 new menu items: Create Public Gist and Create Private Gist

Enjoy!