27 Utilities for Saving and Sharing Code Snippets

You’ve got countless bits of HTML5, CSS3, JavaScript, and PHP rolling around in your head and on your hard drive that you are forced to try to recall each time you start a project. It’s time to get organized.

This post will briefly point you to 27 great utilities that not only help you store your favorite snippets both locally and in the cloud, but also make sharing with others a breeze. Enjoy!

Full-Scale Storing and Sharing

The sites below are a great way to build a personal code repository that you can access from anywhere and easily share with others. They’re also great sites to find helpful snippets in a number of languages.

I haven’t used them all in-depth but my preferred site is Snipplr. I really like the interface, the huge library of snippets, the versioning options, etc. They’re definitely all worth checking out though.

“With Snipplr you can keep all of your frequently used code snippets in one place that’s accessible from any computer. You can share your code with other visitors and use what they post, too. Did we mention that Snipplr works with TextMate? Yeah, we rock.”

“Organize and share your code snippets. Snippetsmania is a free accessible collection of code snippets. It currently supports 34 different programming languages. The database holds a total count of 99 code and programming snippets and examples.”

“Copy Paste Code allows you to publish your code with colored syntax for most popular programming languages out there. After publishing you can share your code to colleagues and friends, and they can debug and use your code snippets.”

“Slexy.org is a powerful, slick, and sexy pastebin designed with the user in mind. Use Slexy.org to paste errors for debugging, show off your code or your tech specs, or share anything else with other Internet users worldwide.”

Mac Applications

In my search for online snippet sharing tools I came across a number of Mac applications that are great for building code libraries so I figured I’d toss them in as well. Check out jCodeCollector and Snippely first if you’re looking for a solid free option.

“Snippely is a basic text and code organizational tool. Instead of storing bits of code, quick notes, and memos in text files all over your hard drive, this application will let you save and organize “snippets” in one convenient location. A snippet is a collection of one or more pieces of code and notes. Snippets are stored in groups for organization and quick retrieval.”

“When you spend all day writing code, it is only natural to start having feelings of déjà vu. Didn’t you write that same few lines of code a few days ago, and again a few days before that? Why are you wasting time re-writing that code again and again? Code Collector Pro is the answer, giving you the ability to store snippets of code and retrieve them with a few keystrokes”

“All of your snippets, the files you need, drafts, parts of a text, CSS templates and anything else you still need in order to deliver outstanding results: All of that is now just one single click, one single keystroke away. ”

Unlike the apps above, Droplr is not the ideal place to store code snippets. However, among other things, it is a super easy way to share snippets of code. Just select some text and drag it to your menu bar. A URL will automatically be placed in your clipboard for you to paste in anywhere you want.

Text Expanders

One special breed of snippet applications is those that allow you to type a few characters which then automatically expand into a larger chunk of text. I’ve recently started using TextEpander and it has completely revolutionized the way I work. Now I can’t imagine trying to code without it!

I’ve searched for hours in vain in an attempt to find a free text expanding utility, leave a comment if you know of one.

“Snippet Monkey saves you countless hours monkeying around by allowing you to create shortcuts for phrases you frequently type. We call the phrases snippets and Snippet Monkey allows you to create new snippets from the clipboard or via our easy to use snippet editor.”

What Are Your Favorites?

There are a lot of utilities here to choose from and I would love to hear your feedback on those that you’ve tried. For my own purposes I use TextExpander to quickly insert code, Snipplr to store random bits long-term, and Droplr to quickly share snippets. What combination will fits your workflow best?