Thursday, January 22, 2009

Ditto: Use a clipboard manager to hold and search prior copies

I get very frustrated with manual, repetitive processes that slow my actual work progress (the process isn't the goal) while making me behave like a robot.  One such process is the assembling of multiple pieces of information.  Windows has a "clipboard" that you can copy to and paste from, but it only holds one item at a time.  If you have several items to copy, this leads to repeated context switching as you grab one item, move to where you want to paste it, switch back for the next item... ad naseum.  Further, if you want to locate an item you copied some time previously, you have to return to the source (or the pasted location) and manually relocate it.

A little used but -- amongst its users -- wildly popular type of utility application is the clipboard manager.  What these do, in essence, is record their own record of each Copy or Cut action for future reference.  You can copy several items in succession, then move to a target document and paste them in one after another, recall each item quickly from the clipboard manager's memory.  Typically, the clipboard manager will have a hotkey combination to quickly pull it up and an interface that facilitates its rapid use.

Although I haven't used it, I understand that one of the most popular commercial clipboard managers is ClipMate.  However, for my use I have found the open source manager Ditto to meet my needs admirably.

Ditto can be run only as needed, or set to start up with Windows.  It can be installed or run as a portable application.  When activated, it records every Copy or Cut action to an internal database.  That database is implemented in SQLite, a very highly regarded lightweight database.  This means that Ditto can hold and search several hundred records very rapidly.

To extract the record of a previous Copy or Cut action from Ditto, you type the hotkey combination to invoke Ditto -- by default, this is Control-` (control plus the backtick key that typically appears above the Tab key on U.S. keyboards).  Ditto produces a list of previous Copy's and Cut's.  The first ten items are associated with a digit; you can immediately select one by just typing that digit.  You can also scroll through the list with mouse or keyboard, and double click or press the Enter key to select the desired item.  For formatted text items, you can obtain a plain text version (with the formatting stripped) by pressing Shift-Enter instead of Enter.

One thing that makes Ditto very powerful is its integrated search.  After invoking Ditto, if you start typing, focus moves to the search box and the listed contents are immediate reduced to those items containing, in their title or in the clip contents itself (when the two differ), the search term.  If your search term begins with a number, press Tab first to manually shift focus from the list to the search box.

In practice, this means that if you remember a portion of an item that you copied some days ago, typing in that portion will likely expose that copy almost immediately and with minimal effort.  The search function also works with wildcards, so that e.g. a search term of "http*" will list all the URL's that you've copied.

Ditto is very configurable.  You can specify the maximum number of clips it will retain, or the number of days to retain unused clips, or a maximum database size.   Hotkeys are configurable.  You can even share clips over a network connection, although I've never tried that.

Ditto appears now to know at least something about Copy actions that other applications flag as containing passwords.  Where this protocol is observed, Ditto will ignore such Copy actions, keeping those passwords from ending up exposed in its database.  This is a real comfort when working with a password manager such as KeePass.

However, as the user you do bear responsibility for remembering that you have a clipboard manager active and that clips can end up in the manager that you do do not want others to see.  You should make sure that Ditto respects the privacy of passwords if you copy them from a password manager.   Ditto can also be temporarily disconnected from the clipboard while you copy sensitive items, so that those items don't end up in its database.

As a precaution, I recommend scanning the full contents of the Ditto list/database occasionally, especially when you are first starting to use it, to make sure that no risky nor embarrassing items have been captures.  If they have, you can selectively delete those items with a click or a keystroke.

It addition to retaining Copy and Cut clips, Ditto can serve quite conveniently as a means of rapidly accessing commonly used items.  Individual items can be flagged so that they are never deleted.  You can then rapidly pull them up with a hotkey or the search facility, either for reference or for pasting.  If you have an address you type commonly, or a salutation, or a few phone numbers that you are constantly looking up, you can put them in Ditto where they are just a keystroke or a few away.  And they don't clutter up your screen or your desk with notes.

Ditto can rapidly become one of your most often used utilities.  And while I've found it very stable, it is possible for the database to become corrupted.  You may wish to add it to your backup routine, to ensure that you don't lose all those items at your fingertips.

Ditto supports a number of clipboard formats, but not all.  When an item is copied or cut to the clipboard, it is identified as having a certain format.  Actually, many applications simultaneously place multiple format versions of a copy onto the clipboard, from which the pasting application can chose.  You may find some formats that Ditto does not support; however, for most everyday copying, it works just fine.

Some copies do not place the contents onto the clipboard; instead, they place a reference.  Then the pasting application can use the reference to directly request a copy of the data from the application being copied from.  These references may not work when Ditto is used as an intermediary.  Again, this is not too common in the Windows world, but once in a while you may come across it.

When you copy or move files using the clipboard, Ditto does not retain copies of those files.  Instead, it gains text records describing the these actions.

With regard to clipboard formats, I'm no expert, but the above paragraphs reflect my understanding of some situations in which Ditto may not perform as expected.

Finally, Ditto is a pop-up application.  It occasionally has a bit of trouble with application focus.  In particular, sometimes double clicking a list item or pressing Enter will not trigger the Ditto window to close.  The item will be selected and moved to the top of the list, meaning it has been placed on the Windows clipboard.  In these cases, you can get the Ditto window to disappear by pressing the Escape key (Esc).  You can then proceed to paste as expected.

If you open Ditto and then decide you don't wish to make a selection, either click outside its window or press Escape.

There are more features and tricks, but that should be enough to get you started and to avoid the most obvious points of confusion.

No comments:

Post a Comment