DEV Community

Discussion on: Mac Keyboard Shortcuts Every Dev Should Know

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.