Clipboard history

The Windows clipboard only remembers the most recent thing you copied [1]. This can be very disappointing. Maybe you cut a large block of text intending to paste it somewhere, but without thinking you cut something else, and then realize you’ve just wiped out your first cut. Here are a few possible alternatives for Windows, MS Office, and Emacs.

A few years ago I tried ClipX, a free clipboard history manager for Windows, based on Jeff Atwood’s recommendation. It worked OK at first, but then I had problems with it and stopped using it. It looks like the software hasn’t been updated since 2008. If you know of a better alternative, please let me know. Also, please let me know if you have suggestions for Ubuntu.

(Update: See the comments for numerous suggestions of ClipX-like products. Also, see PHenry’s comment about clipboard history in Visual Studio.)

MS Office has its own clipboard that will store 24 entries. It stores things that have been copied either inside or outside of Office applications, but you can only paste from the Office clipboard using an Office application.

Emacs has a “kill ring” which is essentially a clipboard. It also has “registers” which are like named clipboard items.

Yesterday Emacs Knight posted a handy little bit of code for viewing your kill ring.

(global-set-key "C-cy" '(lambda ()
    (interactive) (popup-menu 'yank-menu)))

If you add this to your .emacs file, you can type ctrl-c y to pull up a little GUI menu displaying the contents of your kill ring.

[1] I’ve heard that Windows actually keeps more clipboard history, but it doesn’t provide a user interface for accessing that history. I don’t know whether this is true. But if it is, you could access the history programmatically. Maybe Office isn’t maintaining its own clipboard but just exposing more of the system clipboard.

19 thoughts on “Clipboard history

  1. Another vote for Klipper for Ubuntu/KDE (though I think there are many choices for this sort of app by now).

    Also, I’ve been happy with Clipper on Mac OS X.

  2. Hi
    My problem with clipboard on Ubuntu is that if you copy from emacs and then close emacs (before pasting), you don’t have that value anymore (that’s because of how X manages copy/past), so i installed Parcellite to manage it. xclipboard is default in ubuntu.

  3. I have not heard of the multiple-items thing for the Windows clipboard before. Would be interested in hearing more about that. I guess it is possible– stuff is placed on the clipboard in global memory (or at least was) and no reason you couldn’t keep a list of previous stuff. One big problem with this idea is “delay-rendering” clipboard content. If something is really expensive to make a copy of, you could put a marker on the clipboard noting that the actual content should be delay-rendered, ie not actually realized until someone tries to paste it. That way you don;t take the perf/resource hickey unless someone really wants to paste it. (I wonder what percentage of copies end up never getting pasted…) So anyway, my point is that delay-rendered items in a history could go stale. Would that be a big enough detraction from keeping history?

    The short-lived Windows for Networks 3.11 stuff did have a NetDDE hack, I think, and I want to say that it had a network clipboard as well. But I could be getting that confused with a 3rd party add-on. Maybe this is where the clipboard history thing came from? Some feature in an orphaned branch of the windows family tree?

    Anyway, would like to hear more…

    Windows does keep items in multiple formats on the clipboard. I have had the case once or twice in my career where it seemed that the clipboard had become stuck– copies did not replace previous content. I believe both times the stuff I was copying was “rich” content ie an image or formatted text. Switching to a notepad window and copying plaintext unstuck it, thus I concluded it was a resource issue in the app I was copying from.

  4. Have you tried a Windows desktop gadget called ‘Clipboard Manager’?
    You can choose the number of items to store, their size and other options. You can also have ‘Favorite Clips’ if you paste the same item(s) often.

  5. I implemented my own clipboard history for windows. Very easy with the Windows-API – I just had to register as “Clipboard-Viewer”, then windows informs you about all clipboard-action (system-wide) with a callback. I store everything in a database. No problems with all the “standard” formats – of course no support for application-specific formats (every programmer can “invent” his own). The only thing which is not copied directly to the clipboard are file-copies via windows-explorer (it just copies a file-descriptor). All other things are not delayed (afaik) like spork speculated. You can copy to the clipboard a whole punch of different formats of your data – but windows doesn’t keep (an api-accessible) history.

    Now if I read this, maybe I should renew and “polish” my app and release it to the public… (never thought someone would be interested, because back than (was it windows 2000?) my OS came with a clipboard viewer/history preinstalled… Don’t know why MS dropped it…

  6. Hi John, you mentioned Emacs and Office, so I hope you don’t mind if I mention Visual Studio? VS has a clipboard ring and it keeps the last 20 copy or pastes. To cycle through them, you use CTRL-SHIFT-V, similar to the CTRL-V.

    I used to LOVE the numbered registers in vi, but the clipboard ring works nicely as well.

  7. I’ve come to love the Win version of ClipCache. I use it all the time every day.
    I also use it as a mini database for my often used info, for email addresses, for web addresses, vital history clips, My Stuff, Serial Numbers, etc. etc.
    Of course everything saved can easily be pasted.
    Available at http://www.xrayz.co.uk/
    There is a FREE version as well as a Pro Version.

  8. another vote for klipper.
    i love it, when i had to work in windows i was so upset that i didnt have klipper (especially as a programmer i copy and paste a lot, programming is 10% inspiration 90% copy and paste.)
    i have klipper set up to store 198 entries, it can store 2048, you can access klipper through dcop server in 3.x and down (dbus in 4.x and up) so you can copy the entire contents of a file from command line using:
    cat file | dcop klipper klipper setClipboardContents
    this allows you to combine filters on input (such as greping a file, piping to sed to change something, then piping that to klipper)

    this is also why i like juk btw (i have dcop aliases set up to control juk from an ssh session from a my windows vm)
    on windows i use clipx…

  9. I discovered Yankee-Clipper way back when — in the 1990′s some time, I think. The free version, Yankee-Clipper 3, is still out there with its own web site. There’s one you can purchase, too. It has a remarkable number of features for a freebee, and it has served me well for years.

  10. As Alex and Alvaro mentioned, Ditto for Windows. I love it because I don’t ever have to think about it; it just works, works well, and is otherwise completely unobtrusive. Ctrl-` is default paste list key.

Comments are closed.