Try Tuts+ Premium, Get Cash Back!
Sexy Code Snippet Management With Gists
videos

Sexy Code Snippet Management With Gists

Tutorial Details

Final Product What You'll Be Creating

I’ve always struggled to find the perfect code snippet management tool…until now (and it’s free). I’ll show you my preferred workflow, using GitHub Gists and Sublime Text 2.

View at 720p for optimal viewing.

Summary

So that’s the system I prefer these days; do you have a better method?

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • Al

    HI Jeffery,

    I am new to sublime text. and wants to know that sublime text stores the password as simple Text ( as in the video) or later converts it into some encrypted format.

  • emrah

    why i get this error. “401: Bad Credentials”

    • emrah

      The problem is my password, this is really bad for the gist extension. So for anyone using this problem don’t use fancy characters (non ascii) for your password.

  • http://princejets.com/ flyer

    Love ST2 in general but creating snippets is definitely more complex than it used to be with Textmate for me. I like the idea of this but it still seems like a lot of key-presses to get what you want in the actual document and scope that you’re in. I’ve purchased ST2 and use it on a daily basis but there are still things that could be faster. I guess I just need to keep customizing like I did TM and figure stuff out.

    For example, I really miss being able to add and commit in Textmate with a single keystroke. In ST2 it can take 3 or 4 just to commit the files I want, leaving others for a future commit and then pushing to github. Its a pain.

  • http://www.famesbond.com/ aditya menon

    That *is* really cool Jeffrey – especially towards the end. However, would’ve been nice if GitHub provided a way to organize things with folders or something natively, so we didn’t have to create a new test account to store the snippets…

  • http://twitter.com/leggettsteven Steven Leggett

    Great tutorial, wondering if anyone knows if this is available for Aptana?

  • Arvin Pedregosa

    Gist lets you set the language, how do you do this from Sublime? Great tutorial by the way!

  • Noel McAvoy

    It looks like an ‘Insert Gist’ option is now part of the plugin as are several options to only snippets with certain tags or with stars. You may not need a seperate account to stay organized

  • http://alex.leonard.ie/ Alex Leonard

    Hey Jeffrey,

    Thanks for this very handy tutorial. It certainly appeals to me – the idea of having one central online repository of all my snippets.

    Perhaps you could confirm something for me though – there’s one disadvantage in using Gist instead of Sublime’s built-in snippets – the inability to have tab insertion.

    I certainly find tab insertion one of the most powerful and speed enhancing things about vanilla snippets and I miss it greatly when using the Gist implementation.

    Perhaps down to the Gist plugin dev bringing in a new feature! (Unless I’m missing something..)

    Cheers!
    Alex