Keyboard Shortcuts
Almost anyone I work with can tell you how much I love keyboard shortcuts. Anytime I find myself doing something frequently, I check the settings or search to see if there's a keyboard shortcut for it. Keyboard shortcuts are a massive time saver. Anytime you can prevent yourself from having to move your hands from the keys to your mouse to perform an operation, you're saving time. It's why I like using vim mode in my code editor. With one keystroke, I can place the cursor at the end or beginning of the current line. I can tap d
twice to delete the current line. I almost cringe now when I see people use the mouse to highlight an entire line just to delete it.
You get the point. Keyboard shortcuts are a big time saver, and you should probably be using them. Below are some super common keyboard shortcuts that you should definitely be using, followed by some more obscure ones that I find useful.
Note: I use a Mac, so some of these keyboard shortcuts will not apply to Windows/Linux. In many cases, you can substitute cmd
for ctrl
on those operating systems and get the same result. YMMV.
Common Keyboard Shortcuts
These are fairly consistent across any program. Some may not apply depending on what the program is for, but these are generally the same everywhere.
cmd + a
: select everything on the pagecmd + c
: copy the highlighted textcmd + x
: cut the highlighted text (copies it to your clipboard)cmd + v
: paste the copied/cut textcmd + z
: undo the last operationcmd + y
: redo operation (only available after you've pressed undo)cmd + b
: bold (or un-bold) the highlighted textcmd + i
: italicize (or un-italicize) the highlighted textcmd + o
: open a filecmd + n
: new filecmd + s
: save filecmd + p
: printcmd + left arrow
: go to beginning of linecmd + right arrow
: go to end of linecmd + up arrow
: go to beginning of documentcmd + down arrow
: go to end of documentcmd + plus
: increase font size/zoom in (usually)cmd + minus
: decrease font size/zoom out (usually)cmd + ,
: This shortcut is available in most programs. Usually opens your preferences/settings.
Code Editor Shortcuts
Applies to programs like VS Code, Atom, and Sublime Text
cmd + d
: select multiple instances of the highlighted textcmd + shift + l
: if you have multiple lines selected, this puts a cursor on each line, allowing you to perform the same operation on multiple lines at once. Unbelievably useful. If you have a list of 300 words, one per line, you can turn that into an array with less than 10 keystrokes.cmd + f
: open find/replace panel for current filecmd + shift + f
: open project-wide find/replace panelcmd + w
: close the current tab
Browser Shortcuts
As far as I know, these are the same across all browsers
cmd + t
: open new tabcmd + n
: open new windowcmd + shift + t
: reopen the last closed tab. Life saver!cmd + w
: close the current tabcmd + l
: focus cursor in the url barcmd + r
: reload the windowcmd + option + i
: open dev tools
General Mac Shortcuts
cmd + m
: minimize the current windowcmd + space
: open Spotlight. From there you can search the web, open files or programs, use it as a calculator, etc.
Specific Program Shortcuts
These are shortcuts for specific programs on Mac.
Mail:
cmd + 1
: go to inboxcmd + n
: new messagecmd + shift + d
: send messagecmd + shift + n
: get new mail (force Mail to check the server for messages)cmd + r
: replycmd + shift + r
: reply allcmd + shift + f
: forward
Calendar:
cmd + t
: go to Todaycmd + n
: new eventcmd + 1
: Day viewcmd + 2
: Week viewcmd + 3
: Month viewcmd + 4
: Year viewcmd + left
: previous (day/week/month/year depending on view)cmd + right
: next (day/week/month/year depending on view)
If you have any other shortcuts that you use a lot, I'd love to hear about it!