Keyboard shortcuts I couldn't live without
22 May 2017Keyboard shortcuts are interesting. Even though I know they are almost always worth learning, I often find myself shying away from the uncomfortable task of actually learning them. But after years of clumsily reaching for the mouse while my colleagues looked at me with a kindly sense of pity, I have slowly accumulated enough keyboard tricks that I’d like to share them. This set is probably far from optimal, and different people have their own solutions, but it has worked well for me. Before jumping in, here’s a reference table of key symbols and their common names:
Key Symbol | Key Name |
---|---|
⌘ | Command |
⇧ | Shift |
⌃ | Control |
⌥ | Alt/Option |
↵ | Enter |
Sublime Text
Sublime has lots of great shortcuts. My favorites is ⌘D
, which allows you to sequentially select exact matches of highlighted text. Once the matches are selected, you can simultaneously edit them with a multi-cursor. If you want to select all matches simultaneously, rather than sequentially, you can use ⌃⌘G
.
Chrome
With the exception of scrolling and link clicking, everything you do in Chrome should be done with keyboard only. If you’re new to this, I’d recommend starting with ⌘L
, ⌘T
, ⌘W
and then expanding from there. Special bonus: if you ever accidentally close a tab, you can reopen it with ⌘⇧T
.
Mac OS X
On Mac OS X, ⌘ Tab
switches between applications, and ⌘`
switches between windows of the same application. The ⌘+
and ⌘-
shortcuts change the display size of text and other items. You can jump to the beginning of a line with ⌘←
or ⌃A
, and to the end of a line with ⌘→
or ⌃E
. In Terminal, you can delete to the beginning of a line with ⌃U
.
For easy window snapping, use the Spectacle app. Because Spectacle’s default mappings conflict with Chrome’s tab switching shortcuts, I’d recommend setting the four main screen position shortcuts to ⌘⌃←
, ⌘⌃→
, ⌘⌃↑
, ⌘⌃↓
, and eliminating all the other shortcuts, except the full screen shortcut, which should be set to ⌘⌃F
.
Gmail
If you’re using a mouse on Gmail, you’re doing it wrong. With the exception of a few word processing operations, literally everything you do in Gmail should be done with keyboard only. Compose, Reply, Reply All, Forward, Send, Search, Navigate, Open, Inbox, Sent, Drafts, Archive. All of these should be done with the keyboard. To enable these shortcuts, you must go into your Settings and navigate to the General tab. Once shortcuts have been enabled, you can see a list of all them by typing ?
.
With shortcuts similar to Gmail’s, you can jump to different pages using only the keyboard: gh
brings you to the Home Timeline and gu
lets you jump to another user’s profile. The most useful shortcut is probably .
, which loads any new tweets that are waiting for you at the top of the Timeline. You can see a list of all shortcuts by typing ?
.
JetBrains
JetBrains products like DataGrip, PyCharm, and IntelliJ offer plenty of keyboard shortcuts. My favorites are ⌃G
, for sequential highlighting, and ⌥⌥↓
and ⌥⌥↑
for multi-line cursors.
Jupyter
Jupyter has tons of essential keyboard shortcuts that can be found by typing ?
while in command mode. In addition, it’s possible to get Sublime-style text editing by following the instructions described here.