Skip to content

Instantly share code, notes, and snippets.

@rmsj
Last active January 11, 2016 19:34
Show Gist options
  • Save rmsj/57453c986172d6dac728 to your computer and use it in GitHub Desktop.
Save rmsj/57453c986172d6dac728 to your computer and use it in GitHub Desktop.
Mac terminal shortcut

On Mac OS X - the following keyboard shortcuts work by default. Note that you have to make Option key act like Meta in Terminal preferences (under keyboard tab)

alt ⌥+F to jump Forward by a word alt ⌥+B to jump Backward by a word I have observed that default emacs key-bindings for simple text navigation seem to work on bash shells. You can use

  • Meta-d to delete a word starting from the current cursor position
  • ctrl+A to jump to start of the line
  • ctrl+E to jump to end of the line
  • ctrl+K to kill the line starting from the cursor position
  • ctrl+Y to paste text from the kill buffer
  • ctrl+R to reverse search for commands you typed in the past from your history
  • ctrl+S to forward search (works in zsh for me but not bash)
  • ctrl+F to move forward by a char
  • ctrl+B to move backward by a char
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment