Clipboard Manager for coding – PTHPasteboard Pro

I was new to the Mac up until about 5 months ago.  One of the first tools I realized that I wanted was a good clipboard manager.  Why?  I make extensive use of notes (Evernote), code comments and README files to paste examples of code, links to references, etc.  I often found myself switching back and forth between windows with copy/paste, copy/paste, etc.   What I really wanted was to maximize my efficiency with copy, copy, copy … followed by paste, paste, paste …

I ran across a good article at Macworld that helped me identify some top contenders quickly:  Essential Mac utilities: clipboard managers | Macworld.

From the list of clipboard managers, I tried CopyPaste Pro and PTHPasteboard Pro.  I eventually stuck with the latter.  It fit better into my workflow, had some advanced paste features, and allowed me to exclude some tools from copying (such as 1Password) so that I wasn’t putting sensitive information like passwords onto my clipboard.

Screen Shot 2012-12-11 at 12.55.58 PM

PTHPasteboard Pro also allows you to create multiple clipboard areas called Pasteboards.  Below you can see that I have one called “Main” for random copies and another called “Snippets” for code snippets that I might use frequently.

Screen Shot 2012-12-11 at 12.56.46 PM

You can configure your Pasteboards to appear from a pulldown menu, or when you move your mouse to one of the 4 sides of your desktop.  Below you can see an example of some snippets that are available for pasting.   Note that PTHPasteboard Pro gives you the option of pasting in the source format (font, color, etc.) or as text.

Screen Shot 2012-12-11 at 12.55.27 PM

Custom paste filters

Lastly I wanted to point out the ability to use custom paste filters.  PTHPasteboard Pro provides filters (templates) for many types of languages (including Objective C) and allows you to customize them.

Here is an example of an Objective C method implementation template that I tweaked slightly.  It allows me to quickly create a getter and setter for an Objective C property:

- ($TYPE $POINTER)$NAME
{
 return _$NAME;
}

- (void)set$UNAME:($TYPE $POINTER)$NAME
{
 if (_$NAME != $NAME) {
 _$NAME = $NAME;
 }
}

Suppose I have the following property declaration:

@property (nonatomic, strong) UIManagedDocument *contactDatabase;

If I highlight “UIManagedDocument *contactDatabase” (with or without the semi-colon), and then execute the filter, I get the following pasted into my code:

- (UIManagedDocument *)contactDatabase
{
    return _contactDatabase;
}

- (void)setContactDatabase:(UIManagedDocument *)contactDatabase
{
    if (_contactDatabase != contactDatabase) {
        _contactDatabase = contactDatabase;
    }
}

A nice time saver!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s