I <3 Steve McConnell*
Coding Horror
programming and human factors
by Jeff Atwood

October 30, 2005

Improving the Clipboard

In this era of 3ghz processors, 1gb memory, and 500gb hard drives, why is the Windows clipboard only capable of holding a single item? Sure, you have fancy multi-level undo and redo in applications like Microsoft Word and Visual Studio. Did you know that the humble Windows textbox supports a surprisingly deep undo/redo queue via the CTRL+Z (undo) and CTRL+Y (redo) keys?

But not the clipboard. It holds exactly one item. Copy another item to the clipboard and your previous clipboard item is irrevocably lost.

The clipboard is a model of simplicity. And that's admirable. But I think it's too simple. Adding a basic FIFO queue of clipboard items wouldn't affect typical usage -- but it would provide much richer functionality for intermediate and advanced users. Here's one such clipboard utility that I use, clcl. This lightweight utility launches when I press the ALT+C key, and presents a straightforward menu of recent clipboard items:

screenshot of CLCL

Of course, CTRL+C and CTRL+V still work as you would expect. I can't even tell you how many times I've been editing code in Visual Studio and accidentally overwritten the code I copied to the clipboard. Now I don't have to worry; I can just press ALT+C and then use the arrow keys or the number to select the clipboard item I want to paste. The clipboard is a heck of a lot more useful to me when I don't have to constantly worry about losing the one item on it. Clcl even persists the clipboard items to disk so they survive a reboot.

I liked clcl's simplicity, but there are dozens of similar clipboard utilities. To me, that's is a sign that better clipboard functionality really should be built into the operating system. Unfortunately, I can't find any reference to clipboard improvements in Vista. It'd be a darn shame if we're stuck with the archaic single item clipboard for another five years.

Posted by Jeff Atwood    View blog reactions

 

« Avoiding Booleans Search: If It Isn't Incremental, It's Excremental »

 

Comments

At the same time, Outlook and other Office applications that pop up that annoying clipboard list on the right half of my screen can defnitely degrade my user experience when I am only interrested in working with a single clipboard item at a time. I don't really care that in the past day I have added 100 things to the clipboard. I just want the last one. There needs to be a better solution than either keeping track of everything or just one item. The solution you give of being able to show the entire list at my command is better than automatically showing it without me asking for it.

matt on October 31, 2005 01:35 PM

I see that you didn't mention visual studio's built in clipboard functionality. Try CTRL+SHIFT+V. Make sure to keep holding down teh CTRL+SHIFT and keep hitting the V. It will cycle through your clipboard.

I would love to see Windows clipboard work like this.

john on October 31, 2005 01:43 PM

> At the same time, Outlook and other Office applications that pop up that annoying clipboard list on the right half of my screen

I totally agree. Office and VS.NET (thanks for the reminder, john) have app-level "fixes" for the clipboard. But what we need is an OS-level fix!

That's why I prefer a third party utility that offers clipboard history rather than relying on a particular application's implementation.

How do LINUX, OSX, etc handle the clipboard? Do they offer a clipboard stack of any kind?

Jeff Atwood on October 31, 2005 01:50 PM

yes, one OS solution would be best. I would hope that it would have a graphical interface and a power interface using just keystrokes.

john on October 31, 2005 02:05 PM

Linux has multiple clipboards, but that's a Bad Thing; X11 has a clipboard, the console has a clipboard and each terminal window has a clipboard. It's confusing.

Joost on October 31, 2005 07:00 PM

Looks like OSX has the same brain-damaged "one item in the clipboard at a time" limitation:

http://inventive.us/iClip/

Jeff Atwood on October 31, 2005 07:56 PM

Also, someone recently recommended clipx:

http://bluemars.org/clipx/

I just tried it and it's just as lightweight as CLCL and arguably even better. Worth looking at!

Jeff Atwood on November 1, 2005 04:56 AM

To be honest, I'm so used to having only one item in the clipboard at once, I find that MS Office clipboard confusing!

Peter Bridger on November 1, 2005 06:51 AM

You'd want a LIFO for this, not a FIFO, wouldn't you? It would then behave rather like web browsing with forward and back {buttons, commands}.

hgs on November 1, 2005 07:10 AM

> I'm so used to having only one item in the clipboard at once, I find that MS Office clipboard confusing!

I think that's because it's an application specific behavior for something that should be system general.

> You'd want a LIFO for this, not a FIFO, wouldn't you?

Yes, you're absolutely right; I realized that afer I posted :P

Jeff Atwood on November 3, 2005 01:55 PM

What I like most in Jeff Atwood's blog is that very often the guy writes about something and I think 'Yeah! Sure. I totally agree." but somehow I never thought of writing about that topic ! [...]

Serge Wautier on November 6, 2005 06:02 PM

I like multiple items in a clipboard at the OS level but the default action for a (Ctrl+V) should be to paste the last item. Should only show the list with another key combination.
Office clipboard is optional(but ON by default I believe) and I always turn it off.

Srinivas Loka on November 17, 2006 04:39 AM







(hear it spoken)


(no HTML)




Content (c) 2008 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved.