Reinventing the Clipboard

Over time, I've become something of a desktop mimimalist. Sure, I'll change a few settings to my liking, but I no longer spend a lot of time customizing my desktop configuration. I've learned that if the defaults aren't reasonably close to correct out of the box, then the software is probably doomed anyway. For most users the default settings are the only settings.


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2008/01/reinventing-the-clipboard.html

www.Clipmate.com

This program is so awesome that I can safely say it gives me an edge over other developers (I’m a freelancer) that don’t use it.

It helps me remeber what I was working on this morngin, shows screenshot, has shortcuts and is very stable.

Regards, Tom

SDIZ,

"The problem is – clipboard seldom really store those data, but only store a reference to those data. In this way, the client can request for alternative formats of the copied data.

if you don’t know what i means, try to copy something from excel and parse to notepad, excel and word… all shown in different formats."

The clipboard can contain multiple formats of the same data at the same time. They have to be put on the clipboard as part of the same operation, and there can only be 1 item of each clipboard format. The program doing the paste can look at the formats available, and pick one or give the user a choice.

As to why anyone would want multiple items on the clipboard, I use this on a daily basis, especially when I’m adding new functionality across an entire code base and have 3 or 4 different strings that I’m going to be using repeatedly.

(“The other mysteriously missing should-be-standard clipboard feature is “Paste as unformatted text” (which some apps support through “paste special”, but not all). I’ve come to rely on PureText to provide this feature, and I use it often.”)

Yes. MS Word’s Paste always does such insane things with formats that I expect to open up the monitor and find, Flintstones-style, a pack of miniature blind rabid monkeys pushing the letters into place. Word should default to unformatted paste. There’s not even a direct keystroke assignable to it. However, you can write a macro and assign a keystroke to that:

Sub PasteUnformatted()
Selection.PasteSpecial Link:=False, DataType:=wdPasteText
End Sub

Sounds like you need to try out Linux. I used to be a Windows power user and installed all those apps, trying to make Windows do what Microsoft refused to include by default. After switching to Kubuntu about 1.5 years ago, it’s been nothing but bliss. If I ever need a Windows app, VirtualBox’s seamless mode has served me amazingly well ( http://www.fsckin.com/2007/10/29/how-to-run-microsoft-outlook-natively-on-linux-using-virtualbox/ ).

This has been in KDE … since … well maybe it doesn’t qualify in your “none of the major operating systems have bothered improving the clipboard” statement.

Emacs has a clipboard history, as well as named clipboards (called registers). If that isn’t enough you can define and name keyboard macros to enter the text you wish to insert.

Does Emacs count as a major operating system?

Yeah, I’ll second the above statement for KDE and it’s also been in Gnome for years (another Linux desktop).

Personally, I’d consider the major operating systems to include Windows, Mac OS X and Linux. However, I’m aware the last one isn’t top of everyone’s list.

Interestingly I’ve been using the well-known Autohotkey script langauge to utilize the same short-cuts you mentioned in your blog post. Example: WinKey+G searches Google with the contents of the clipboard, WinKey+I searches Google images. WinKey+W opens a webstie in IE, +F opens it in Firefox, +O starts Outlook, WinKey+M mutes the sound. It goes on and on. I’m also using B,N,F,P,K,L,A,S,X,C,V for shortcuts and I am running out of letters.
Honestly, I don’t know how in the world I can remember all these shortcuts, but they have become so vital for my productivity that they are keeping me from moving to Vista, because the script doesn’t work in Vista…

What I dislike the most, about the clipboard, is the really bad behaviour in VS. Say you cut something, then you try to past it elswehere but you hit the C instead of the V (without any text selected) and bravo, you’ve lost your clipboard content! You now have to undo 3 or 4 times to re-start the manipulation. This is anti-productive at the most.

For those of us who like DOS boxes, or UNIX enthusiasts of the command line, copy/paste is mind-dead in yet another way. It is very common in Unix to copy something and paste it to the command line. There ought to be a single command to do this, but you have to paste separately. In a DOS box in windows, the paste operation was designed by a moron who never used it, I think.
-tobias d. robison

Fabian: That one gets me too, but the good news is that you can turn off that behaviour in Visual Studio.

Go to Tools-Options…-Text Editor-All Languages-General and untick “Apply Cut Copy commands to blank lines when there is no selection”

(I guess this goes towards what Jeff was saying about software having reasonable defaults).

On my windows phone you just hold the stylus down over highlighted text, get a little circle thingy and then it lets you cut, copy n paste. Shame there isn’t a button for it but it does let you move address and phone numbers round.

I’ve been hooked on CTRL+SHIFT+V because of IntelliJ IDEA and I was looking for something system-wide.Thanks!

Fabian, don’t you think it’s due to the very thing Jeff enlights here : the fact the the clipboard has not changed since (at least) Win95 ?
I fully agree with you, Jeff, on clipboard limits (altough I use another replacement - CLCL - since it’s the only one that support copy-paste with Java application - namely Eclipse). The main question is : why has it never be included in major desktop OSes (sorry for linux ealots, ut in terms of UI, the open-source OS has never been a champion) ?
To my mind, the reply is to look up somewhere in the divide between educated computers users (and productivity fans) and “casual” users, for which copy/paste is a somewhat weird operation.

I think the reason you don’t find the Clipboard functionality in the Linux Operating System is that a clipboard is not a operating system function! It makes no more sense to put a clipboard in an operating system than it does to put shell history in the operating system. This kind of user-specific functionality should be belong to part of the user presentation (Windows Manager, shell, etc). In Linux, this functionality is found in Windows Manager (KDE, etc) – which is where it should belong (and where it has been for years).

Microsoft Windows tends to blur the distinction between the operating system and user presentation; but that doesn’t mean we who know better have to buy into their sloppy thinking. This is, afterall, the same company that vehemently argued in court during the anti-trust suit that Internet Explorer was a necessary and indepensible component of the Windows operating system.

GrahamStw, thanks for the tips. But I can’t understand why this option exists at all…

I use an autohotkey script that keeps adding to the clipboard via the normal Ctrl+C, the pasting is done via Winkey+1, 2, 3, etc. Yes you’d have to remember what you copied and in what order, but I do, so it works well for me.

The thing that annoys me is that Excel, in versions up to 2003 at least, loses what’s on the clipboard if you do anything apart from moving around the spreadsheet. How arcane is that?

@Fabian GrahamStw:
I would say that when you can’t hit the keys you want then don’t blame the software :wink:
I do like this feature, it’s a logical quick shortcut to copy the actual row without the burden to select it first.
You could say the same if you selected something and want to replace it with your clipboard content - and accidentally hit copy instead of paste. Stupid program, eh? :stuck_out_tongue:

I think starting with Office XP there was a multi item clipboard in office, but I didn’t like the implementation, especially that when closing office you were asked if you want to keep the clipboard content. ARGH!
Maybe this was a case study and (due to its stupid implementation) wasn’t much accepted, so MS decided to not change anything about the clipboard?

Also I think that VS supports multiple clipboard items, too…