Boosting Software Developer Productivity with a Clipboard Manager
Being able to select and paste more than 1 clipboard item at a time is a huge time saver. Here's a few apps for each major OS.
One perk of doing freelance development work is I get an opportunity to work with many developers on a regular basis.
Since most of my work is remote, I do a lot of screen sharing with developers and it’s always interesting to see how they have their development environment set up.
Lately I’ve been finding more and more people using third party clipboard managers. The main feature of one is the ability to store multiple items in your clipboard and then easily search and pick the result you want when it comes time to paste your data.
I can’t believe how long I’ve gone without using one myself but now that I’ve been using one for a bit, I can’t imagine life without it.
Why Would You Want a Clipboard Manager?
As software developers, we’re constantly copying code from our own code bases, stackoverflow, gists… you name it, we copy it! Think about how many times you’ve copied something, but then copied something else, only to realize 15 seconds later you want the first thing you copied again.
Now you’re stuck re-copying the first thing you had, but that might have came from a web page you’ve closed, so you have to go back and find it again. I thought long and hard about this work flow and it’s something I used to do a lot.
This is where a clipboard manager steps in to save the day. There are free and paid apps for Windows, MacOS and Linux.
Which Clipboard Manager Should You Use?
There’s many different apps to choose from. I’m going to list what I think is a good one to use for all major operating systems.
My criteria for a good clipboard manager would have at least these features:
- Configure hot keys to bring up the clipboard selector (I use
CTRL + Alt + V)
- Quickly select a clipboard item via hot key, arrow keys or mouse
- Search through the list of clipboard items immediately
- Configure how many items get saved and when they expire
- Ability to paste in plain-text as a separate hot key
The last one is useful because how many times have you tried to paste code from your editor into a gmail message and now you have all sorts of background colors and formatting from your editor? It happens to me all the time.
Having an ability to paste an item without formatting is really nice to have.
I spent quite a bit of time researching and trying a few different apps out. This involved reading comparison reviews, watching Youtube videos and also installing some of the best candidates on my machine to try them out.
I came to the conclusion that Ditto was the best option for me because it nailed all of the important features listed above and more. Here’s a screenshot:
You can really tell that the person who created this application is a user of their own app.
For example, when you hit your hot key to bring up the clipboard selector, the first item is selected but if you want to search to narrow down your clipboard items, you can just immediately start typing to filter without having to move into the search box.
Something like that wasn’t “invented”. That comes from real world usage.
It also supports images and even has a nice little tooltip feature where if you mouse over a clipboard item you can see the full contents (for text).
Also another nice perk is it has a portable installer and only uses about 2.5mb of RAM.
It’s funny because my machine has 16gb of RAM but my mindset on memory usage is still back in 1999 when the RAM usage of a program actually mattered a lot. It makes me happy to see that some people still care about memory and runtime efficiency.
Making Ditto Work with WSL Terminals
The only problem with Ditto is if you use WSL, most terminals accept
CTRL + Shift + V to paste, not
CTRL + V and Ditto sends the virtual key code for
CTRL + V to paste text.
However, if you go to the options menu for Ditto and then advanced options (under general), you can change the default paste string as seen in the screenshot below:
That makes Ditto send
CTRL + Shift + V as its paste code and now terminals like
ubuntu.exe and wsltty will work, or any terminal that expects you to use
CTRL + Shift + V.
Although, this also means applications that support
CTRL + V for pasting will not work through Ditto, but fortunately browsers like Chrome allow for
CTRL + Shift + V to paste.
In other words, Ditto will work inside of your terminal, VSCode and Chrome so that should cover 99% of the use cases where you would want to paste from Ditto. In other cases, you can simply press
CTRL + V to bypass using Ditto.
Lastly Ditto is also open source which is great, and they accept donations too.
As you know I run Windows, so I don’t have any first hand experience with using a Mac for full time development but through out my screen sharing sessions I’ve seen 2 apps. They are both paid (welcome to Apple?), but I’m sure there are free alternatives to choose from.
The one I personally liked the best based on first impressions was LaunchBar:
I know, LaunchBar isn’t technically a clipboard manager because it happens to do a lot more than that too, but it just so happens that its built in clipboard manager is pretty sweet.
Its minimal but covers all of the features of making it a good clipboard manager. It’s $29.99 but keep in mind, you’re getting a lot more than just clipboard goodies.
It also has some really cool features that don’t exist in Ditto, such as if you select a clipboard item you can use the right arrow to peek into that item and have it get broken down by line, and then you can break down that individual line into words. You can then paste the broken down components of the item instead of the whole thing.
The other clipboard manager I’ve seen being used is Paste 2:
This one has a really powerful search and it has some developer oriented features such as code snippet highlighting. As you can see, it’s much less minimal. It also costs $9.99.
I would say try them both out because they have free trials. Paste 2 is much less minimal but it may have some features you want. Of course there are many other options too, and some free apps as well. Do a bit of research with Google and let me know how it goes.
I don’t have any experience using clipboard managers on Linux so there’s not much to say.
It looks like someone over at Tecmint did a high level comparison of 10 different clipboard managers for Linux so you may want to check that out. I found that list by Googling.
Just based on the screenshots they posted, I would probably start with Clipman:
It looks like a minimal drop down menu and it’s based on XFCE which is awesome because I used to run an xubuntu VM for around 5 years which uses XFCE under the hood.
BONUS: There’s Also pbcopy and pbpaste
Since we’re talking about clipboard optimizations, here’s 1 more thing to look into using.
MacOS comes with 2 commands called
pbpaste. They allow you to access your clipboard in your terminal, but you can set this up for Windows and Linux too.
For example you could do
whoami | pbcopy and that will copy your currently signed in user to your clipboard.
Likewise, you could run
pbpaste to paste the contents of your clipboard to STDOUT. That means you could do things like
pbpaste > example.txt to write out a new file with the contents of your clipboard. That’s pretty handy sometimes.
If you want to get this running on Windows with WSL (which is what I do) or Ubuntu, just run
sudo apt-get install xclip and then open up your
~/.bashrc file and create these 2 aliases at the bottom of the file:
alias pbcopy="xclip -selection clipboard" alias pbpaste="xclip -selection clipboard -o"
Now you’re all set up to use
pbpaste. Make sure you run
source ~/.bashrc to reload your shell session, and make any necessary adjustments if you’re using zsh or fish.
Are you using a clipboard manager? Which one are you using? Let me know below.