DEV Community

Cover image for Mac Keyboard Shortcuts Every Dev Should Know

Mac Keyboard Shortcuts Every Dev Should Know

Tori Crawford on October 30, 2019

Something that has always interested me is the impact that small actions have on our daily lives and I think knowing keyboard shortcuts is one of t...
Collapse
 
thatblairguy profile image
That Blair Guy

Congratulations on discovering keyboard shortcuts, they are a superpower.

Three bonus items for you:

  • Command + C - Copy (depending on the program and whether anything is highlighted, this will copy the highlighted text, the current line, or even an image. Use this in the Finder to copy files.
  • Command + X - Cut. Similar to Copy, except that it removes the item from the source location.
  • Command + V - Paste. Places the copied/cut item at the current point of focus.
Collapse
 
torianne02 profile image
Tori Crawford

How did I manage to forget the ones I use THE MOST 🤦🏼‍♀️ 😂

Thank you for adding them!

Collapse
 
gypsydave5 profile image
David Wickes • Edited

Fantastic list - I didn't know a lot of these.

Something I accidentally discovered is that most of the Emacs-style shortcuts will also work on OSX - you may need an alternative keyboard to access the Meta (aka Alt) key, but here are some basics using Control:

  • Control-e: end of the line
  • Control-a: beginning of the line
  • Control-k: 'kill' (cut) everything from the cursor up to the end of the line
  • Control-y: 'yank' (paste) what you just killed
  • Control-h: delete a character backwards
  • Control-d: delete a character forwards
  • Control-n: next line
  • Control-p: previous line
  • Control-f: forward one character
  • Control-b: backwards one character

There are many more. To make the most of these swap your CapsLock key with Control (can be done in the Settings -> Keyboard -> Modifier keys...).

Have fun.

Collapse
 
renzit profile image
Renzo Mayer

Well done and thank you!
I think is a nice iteration on shortcuts, for te next one, if there is one, I would love to hear about gestures for the trackpad, switch desktops, etc focused on web operarions workflow!

Collapse
 
codenutt profile image
Jared

If you reeaaaally like keyboard shortcuts, you should check out Vim.

Collapse
 
yevgalis profile image
yevgalis

I was looking for this one command + shift + L for a long time, so thank you!

Collapse
 
mensdarko profile image
Darko Mens

Good to share

Collapse
 
flexdinesh profile image
Dinesh Pandiyan

Thanks Victoria. This is very helpful.

Collapse
 
simoroshka profile image
Anna Simoroshka

my favorites are cmd + f, and in code editor: cmd + shift + f (search whole project) and cmd + p (search file by name).

Collapse
 
torianne02 profile image
Tori Crawford

I had no idea about command + shift + F or command + P before! Thank you for sharing.

Collapse
 
pris_stratton profile image
pris stratton

Wow there are loads I didn’t know. Thank you 😁

Collapse
 
shawnpm profile image
Shawn

Here are some flashcards to learn all the mac keyboard shortcuts

knowledgize.com/en/d/mac-keyboard-...