Moxley Stratton

Code Blog

Ten Secret Key Bindings From OS X

Did you know that when using these applications:

  • Any application on OS X, except Vim and MS products
  • Bash, or any console program with Readline support

These key bindings are available:

  1. Control-A - Move to beginning of line
  2. Control-E - Move to end of line
  3. Control-F - Move forward one column
  4. Control-B - Move backward one column
  5. Control-N - Move to next line
  6. Control-P - Move to previous line
  7. Control-D - Delete next character
  8. Control-H - Delete previous character
  9. Control-K - Delete from cursor to end of line
  10. Control-Y - Paste what was deleted with Control-K

It seems silly, but the thing I love the most about OS X is the ubiquity of these key bindings. Any text editing, from writing a blog post in Chrome, to writing code in TextMate is immensely sweeter with the availability of the above key bindings. One need not leave the keyboard’s home row to do much of anything when they’re available.

Whether you use Emacs or Vim or another text editor, learn to use key bindings that allow you to keep your fingers close to the home row. Your text editing will be faster an more efficient.