Utilizing Keyboard Shortcuts like a Pro

May 25, 2017 • Productivity

As a software developer you always have a big choice of kind of skills in which you can improve yourself. Most of them are pretty complex, require you to learn new concepts and paradigms. Some on the other hand are basic and have touch points with the majority of our working time. As always, we should go for the low hanging fruits to improve ourselves. Today: Learning and using keyboard shortcuts as a developer – Probably also interesting for everyone else working with text.

Why Shortcuts?

Shortcuts save a lot of time when working on the computer. I guess we all do that very often. Every application but also the operating system itself offer a various amount of key combinations to do something very quickly, without using the mouse. The computer mouse is handy for everyone. But we don’t want to be everyone and perfect the skills of our profession continuously. This is why we should bite the bullet.

Learning shortcuts always looks tedious but once you discovered a landscape of actions you really need often, learning them saves you lots of time, just takes some days and simply feels great.

Discovering Shortcuts

If you show shortcuts to people, there is almost a funny “Aha!” effect, e.g. during pair programming or presentations. This way you can learn single ones. It’s more expedient to discover which shortcuts you really need. IntelliJ IDEA can help you with that, as it analyses your development behavior and shortcut usages. Use the Productivity Guide in the Help tab to see information about your

Besides the IDE, your operating system can also help you optimizing your daily business by shortcuts and convenience functionality. Same for your Terminal (probably iTerm2).

So, listen to your tools and let’s have a look together for some general ones. As operating systems and IDEs differ and I only know my tools of choice, I only go into detail for Mac OS X and IntelliJ IDEA as development environment.

General Shortcuts

This list contains shortcuts that work in OS X, terminal, Finder, browser and todays’ cool IDEs.

Shortcut What it does
⌘ + ⇥ Switch between open applications
⌘ + Space Open Spotlight to search for things
⌘ + {C | V | X | A | F} {Copy | Paste | Cut | Select all | Search} text
⌘ + {T | W} Open new tab/Close current (Finder, browser, terminal, IDE)
⌘ + Number Switch to tab with number (left to right)
⌘ + O Open selected item (Finder)

IDE Control

An IDE is not only about files and text, it’s about displaying code as cohesive programs and enabling us to maintain and extend them best possible. Therefor it offers a lot of actions that normal text editors do not know. IntelliJ IDEA is the one I use mostly together with a customized Atom installation (which is also able to adapt the key-map of IDEA by a plugin).

Shortcut What it does
⌘ + O Search for a file
⌘ + A Search actions
Double shift Search in all files
Ctrl + Space Auto completion
Shift + Ctrl + Space Smart auto completion
Ctrl + T Refactor this (refactoring context menu)
Ctrl + G Add current selection to multicursor
Ctrl + G + ⌘ Add all equal tokens of the current selection to multicursor

Text Selection

What I observed from myself, I tend to use my mouse more often when it comes to text selection. This happens very often as a Developer. Writing code, messages in Slack, writing emails or tweeting – we write tons of words per day. Most of it is not final, so we have to edit it. To edit it, we have to select it. It seems obvious to use the mouse for that but in theory we don’t have to because everything can be done with a keyboard. Let’s see…

Shortcut What it does
⌘ + {⬅ | ➡} Jump to start/end of line
Alt + {⬅ | ➡} Jump to next word on the left/right
Shift + {⬅ | ➡ | ⬆ | ⬇} Select text into direction (by character or line)
(all above) + Shift Move selection while cursor is moving

Conclusion

Of course there are many more applications and also different keyboard and shortcut layouts, so this post is limited on only a few aspects. For me personally it was important to learn to make free for those productivity improvements every now and then. When you notice that some actions always take too long, try to automize them. This also applies to shortcuts, so make sure to learn your tools properly. It not only makes you quicker and lets you provide more output. Furthermore it feels just good to not spend too much time with stupid tasks. Instead of that we’ll have more time for important aspects of our work.