Skip to content

Instantly share code, notes, and snippets.

@hyfather
Created October 25, 2011 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyfather/1311323 to your computer and use it in GitHub Desktop.
Save hyfather/1311323 to your computer and use it in GitHub Desktop.
Shortcuts with the emacs readline

M stands for the Meta key. Commonly represented by the Alt/Option/Esc key on your keyboard.
C stands for the Control key.
Example -- C-k means 'hit k while keeping Control pressed.'

M-.
Yank the last argument to the previous command.

M-C-y
Yank the first argument to the previous command.

C-k, C-w, M-d, C-u
All these kill text in different ways and save it in the kill-ring.

C-y
Yank most recent item from the kill-ring.

M-y
Immediately follows a C-y. Cycle through the kill-ring.

!!
Substitute the previous command (e.g. sudo !!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment