Aaron S. Hawley (aaronhawley) wrote,
Aaron S. Hawley
aaronhawley

Learning Emacs key bindings

Emacs key bindings are intimidating at first since they are quite distinct from those used in other applications and platforms. The following is based on discussion on the Emacs IRC channel and is posted to the Emacs Wiki.

After studying the tutorial that comes with Emacs, most people learn best by doing and not just by reading over a list of commands and trying to memorize them. Get yourself a text file to play around with. Make a backup copy if you're nervous about losing it. But don't worry -- Emacs makes it hard to lose your work, and it has a great undo command: `C-/' or `C-_'.

Keep the following advice in mind.

  1. Try to memorize the most commonly used commands in the tutorial.
  2. Use Apropos or help to find commands to accomplish a task.
  3. Run the command for a task with `M-x' and typing it in.
  4. Run the command again by using `M-x M-p' or by typing it in again.
  5. On the third time, see if the command is bound to a key binding with `C-h w'.
  6. If you forget a key binding (sometimes you forget even the basic commands introduced in the tutorial), try `C-h w M-p' to peek at it again or use `C-h b' to browse the available bindings.
  7. If you can't burn a key binding in to your brain with this approach, then you're not using it enough and it doesn't deserve a key binding.
  8. If a key binding is atrocious, only then bind the command to an unused key.

Some beginners rush too quickly and add or change key bindings. This avoids learning Emacs and risks spending more time configuring. Competency with `M-x' and help are actually core Emacs skills for life. `M-x' should become your command line in Emacs.

Tags: emacs, free software, howto
Subscribe

  • Big Emacs reference card updated

    With the release of Emacs 24.3 last month and the big changes at EmacsWiki, I've posted an updated version of the giant Emacs reference card. It…

  • M-x in Emacs 24.3 is now in Lisp

    It didn't make the NEWS file for Emacs 24.3, but Emacs now ships with an ` M-x' (` execute-extended-command') that is written in Lisp. It is no…

  • Frobbing pi in Emacs Lisp

    What follows is 500 years of technique used to calculate pi -- in Emacs -- up to 1997. No, Leibniz didn't write Emacs. However, the Lisp available…

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments