Log in / create account | Login with OpenID
DocForge
Programmer's Wiki

Emacs

From DocForge

Emacs is an extensible text editor based on a lisp interpreter.

[edit] Emacs Shortcut Keys Quick Reference

C refers to the Ctrl key. M refers to the Meta key, usually Alt on standard 101+ key PC keyboards, sometimes Esc. Note than left and right Ctrl and Alt keys may act differently. Try the left one first. Hold down Ctrl and Alt while pressing another key. For Esc, press Esc, let go, then press the next letter. Normally keyboard arrow keys are sufficient for simple cursor movement.

Keys Operation
C-x C-f Find (open) file (type path at bottom of screen, TAB auto-completes)
C-x C-s Save file
C-x C-c Exit emacs
C-g Abort any command
C-x u Undo
C-l Redisplay the screen if it is garbled.
Cursor Movement
C-a Move cursor to beginning of line
C-e Move cursor to end of line
C-v Go forward one screen-full of text
M-v Go backward one screen-full of text
M-f Move cursor forward one word
M-b Move cursor backwards one word
M-> Move to end of file
M-< Move to beginning of file
Cut & Paste
C-k Kill (cut) text from cursor to end of line
C-y Yank back (paste) killed text
C-space Set mark
C-w Kill (cut) text between mark and cursor
M-w Copy text between mark and cursor
Windows & Buffers (Open Files)
C-x 0 Close current window
C-x 1 Close all windows except current
C-x 2 Split window horizontally
C-x 3 Split window vertically
C-x o Switch to other windows
C-x b Switch to another buffer (open file)
C-x C-b Show buffer list
C-x k Kill buffer (close file)

[edit] See Also