Navigation |
(C-p) |
move back a line |
(C-n) |
move to the next line |
(C-f) |
move forward a character |
(C-b) |
move back a character |
(C-a) |
move to beginning of line |
(C-e) |
move to end of line |
(C-v) |
move forward a screenful |
(M-v) |
move back a screenful |
(M-<) |
goto beginning of buffer |
(M->) |
goto end of buffer |
(M-g) line no |
goto the specified line no |
Using Frames |
(C-x) 0 |
Closes the current frame, without killing the buffer |
(C-x) 1 |
Closes all other frames, bringing the current frame
to the front |
(C-x) 2 |
Splits current frame horizontally |
(C-x) 3 |
Splits current frame vertically |
(C-x) o |
Move between the frames |
(C-x) b |
Switch between buffers in current frame |
(C-x) k |
Kill buffer in current frame |
(C-x) (C-b) |
Opens/Updates a buffer window listing all current
buffers |
(C-x) (C-f) |
Opens a new buffer in the current frame |
Editing |
(C-l) |
redraw current buffer |
(C-x) u |
undo the effect of the last command |
Backspace |
delete the character before the cursor |
(C-d) |
delete the character after the cursor |
(C-k) |
move the rest of the line to a new temporary buffer/
existing temporary buffer is appended to |
(C-y) |
paste contents of the (C-k) buffer |
(C-space) |
begin selection of text in buffer |
(C-w) |
move contents of selected text to the (C-k) buffer |
(M-w) |
copy contents of selected text to the (C-k) buffer |
(C-x) i |
Insert a file into the buffer |
(M-q) |
"justify" the current paragraph, that is, redo the
line breaks in the current paragraph) |
Find and Replace
|
(C-s) (string) |
specify a string to search for (in cureent buffer) |
(C-r) (string) |
specify a string to search backwards for (in cureent
buffer) |
(C-s) (C-s) |
search for the string previously searched for |
(C-r) (C-r) |
(similar) |
(M-x) query |
allows you to do the query-replace command on the
file which can replace any string by any other. On each occurrence it allows
you to decide whether or not to do the replacement. |
(M-x) replace-string |
same as above, but does not query--just does it all |
Compiling/Running Java programs
in Emacs |
(C-c) (C-v) (C-c) |
Compiles the Java file in the current buffer |
(C-c) (C-v) (C-r) |
Runs the compiled version of the current buffer |
Opening and Saving Buffers
|
(C-x) (C-f) |
opens the specified file |
(C-x) (C-s) |
save the current buffer in its associated file (creates
file if it does not exist) |
(C-x) (C-w) |
write out the buffer in the current frame to the specified
file |
Exiting/Suspending Emacs
|
(C-x) (C-c) |
Exits Emacs |
(C-z) |
Suspends Emacs |
Using the unix shell from
Emacs |
(C-q) (any keystroke) |
send keystroke to shell instead of being interpreted
by emacs |
(M-x) shell |
open a shell prompt in the current frame |
(M-p) |
Put the last shell command on the current line of
shell (this does what C-p does in a typical unix shell) |
(M-n) |
(similar) |
Troubleshooting |
(C-g) help |
Aborts any command that you've partially specified |
(M-x) blah? |
list all the possible completions to the string "blah"
that are valid commands |
(M-x) help |
Help on commands and key bindings |