Main menu:


Site search

My Wife’s Website

Recent Posts

Categories

Archives

January 2008
S M T W T F S
« Dec   May »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Links:

Meta

Reinventing the Clipboard (Reprise)

Recently, I read a post on Reinventing the Clipboard by Jeff Atwood.  Jeff described the advantages of using multiple clipboards and gave a review of ClipX. I tried it out and really liked it.

What interested me the most was the Google Search Hotkey.  It would launch a browser with a search started at Google based on the contents of your clipboard.

Often, I will get an email (or some other type of text) that contains a referenced resource that doesn’t have a hyperlink, but is easily recognized based on the textual context.  The most common is a bug id or an email address.  Email programs will attempt to automatically hyperlink some well known formats like email addresses (which can be annoying at time if you don’t want it to be a hyperlink).

For a while, I have been using a set of cobbled together scripts that would search the contents of the clipboard for certain regular expressions, if one was found, it would launch an browser with an associated URL using matching substitutions from the regular expression.  Here are a few examples:

Name: Bugzilla
Pattern to match: (?:bug|scr)?[\s:#]*(\d+)
Navigate to: http://bugzilla.inin.com/bugzilla/show_bug.cgi?id=\1

Name: Perforce
Pattern to match: (?:cl|change|changelist)[#:\s]+(\d+)
Navigate to: http://perforce.inin.com:8080/\1?ac=10

Name: Email Address
Pattern to match: ([A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4})
Navigate to: mailto:\1

When I saw ClipX, I thought, "if only he could generalize the google search to allow regular expressions matches, then I could ditch my scripts and have multiple clipboards to boot."  I sent an email to the author of ClipX, Francis Gastellu, and he was very responsive.  Actually, by the next day he had released the Smart Navigation plugin to ClipX.

I was able to easily add the patterns that I had in my previous scripts.

SmartNavigationPlugin

 

 

 

 

 

 

 

 

 

He has a few Presets that are handy.  Actually the one that sold him on the idea was the Bugzilla pattern.

Presets

 

 

 

 

 

 

Editing the entry is straight forward.  The preview window is a really nice touch.  The boost regular expression syntax is used for the pattern matching.

EditRegex

 

 

 

 

 

 

For those fellow developers at Interactive Intelligence, I created an export of some common entries.  Please let me know if you know of other entries that would be helpful.

Comments

Comment from Jeff Moser
Time: January 24, 2008, 9:05 am

I started using ClipX after Atwood’s post as well and have found it helpful. I’ll check out your entries.

Comment from Dennis
Time: February 23, 2008, 10:02 am

This sounds great. I have no idea what you’re saying.

Write a comment