Update: This works all the way up to 10.10 Yosemite.

Ever wanted to have some more organization on your dock? I like to keep things separated more or less by group: everyday things, development tools, and apps that just happen to be open but aren’t permanent fixtures on my dock. I also like to keep my documents and folders separated from minimized things and the trash on the right side.

A Mac dock containing spacers
A-like so

It’s fairly simple to drop some spacers into your dock. And yes, it uses Terminal, but don’t get squeamish. Just copy and paste the lines you see below. To add spacers to the left side, open up Terminal and paste this:

defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'

Now mash Enter.

And now you’re wondering why nothing happened. We have to reset the dock to make the space appear. Now paste this:

killall Dock

And mash Enter again. Your dock will vanish and reappear with a space at the end of the left side. You can drag it around (or even off) just like any other icon. Repeat as desired for more spacers!

And for the right side…

Paste this, followed by the usual mashing of Enter afterwards.

defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'

Follow it up with the usual:

killall Dock

Now speak aloud the word “booyah” or other popular slang term designating success.

Note: I’ve confirmed this also works in OSX 10.7 Lion