Tools and techniques to be productive using only a keyboard.hack vim keyboard mouseless productivity
“Every second counts”.
We’ve heard this phrase often and we probably have said this ourselves many times. If we value time so much, and an average developer spends most of the 8 hour work day on a computer, should we not look at ways to cut away wasted time?
How many times in an average coding session have we moved between the keyboard and the mouse, be it switching tabs, copying lines of code from stackoverflow, running commands in the terminal, checking Slack, or doing other tasks? If each time that happens we need to move a hand from the keyboard to the mouse takes a split second, those split seconds add up. Making the mouse redundant helps us save those split seconds.
I have started making the effort to use the mouse as little as possible recently, and here I will document the many techniques and tools available to make that happen. This guide will be focused on Mac, using tools available on the OS. For Windows/Linux users, you could take inspiration from this guide and look for similar tools in the respective OSes. I will be updating this guide time to time with new tools I find useful.
OS keyboard shortcuts
These are the basic shortcuts we must use all the time. They are available out of the box and immediately saves seconds of work.
- Text editing short cuts (copy
cmd + c, paste
cmd + v, cut
cmd + x, undo
cmd + z, etc)
- Window switching
cmd + tab
- Tab switching
cmd + ~
Start using these right now if you haven’t.
Use an app launcher
An app launcher saves seconds, as all you need to do to start an app is to use the launcher shortcut and type the first few letters of the application name. I recommend Alfred, which is free to start with a premium version with more features. The free version of Alfred gives you ability to search apps, files, run system commands like locking your Mac (a very important thing to do) or searching the web, all out of the box and from the comfort of the keyboard.
With a launcher like Alfred, my advice is to install it, get started with the most common tasks such as searching files and launching apps, and take the time to get to know its features. When you’re ready, you can consider the premium version with more advanced features.
An added benefit of using a launcher is that now the Dock is practically useless, as anything on the Dock is available via the launcher. So hide it and you get a few cms worth of screen real estate.
Use built-in app shortcuts
All apps today come with preset shortcuts for the most common tasks. CheatSheet is a free app that shows you a cheat sheet of the keyboard shortcuts available on the currently active app. Hold the shortcut to CheatSheet (
cmd by default), and an overlay appears listing the available shortcuts. Learn these and over time you’d be blazing on the keyboard while using your favorite apps.
Gmail has built-in shortcuts for most tasks, such as opening email, navigating between emails, archiving, etc. It’s not enabled by default, so you’d need to turn it on in the Settings.
Once this is turned on, all the shortcuts can be displayed by pressing
Common shortcuts I use all the time are:
- going from email to email (next
- opening an email
- responding to emails (reply
- adding email to selection (selecting the checkbox)
- archiving selected emails
Surf on the keyboard
If you’re a Chrome user, hurry and install Vimium. It provides keyboard shortcuts for the most common navigation and commands on Chrome.
What I find most useful is
F, which overlays hot keys for every link visible on the page that you can use to quickly navigate to. So for example, to go to the link that appears on the bottom of the screen in the screenshot below, it can be done simply by pressing
F followed by
AW. Instantly navigate to any link without moving a hand off the keyboard.
The next useful feature of Vimium is the shortcut keys to scroll a page. They are based off Vim shortcuts, so
l scrolls down and up respectively, while
u moves half a page down and up respectively.
There are many other shortcuts available on Vim, some more useful than others, but I find these few to be the most bang for bucks that give instant boost to productivity.
More to come
Alfred powerpack + app workflows