GNU Emacs Notes
See Emacs_Reference
General Commands
save: ctrl-x ctrl-s
exit: ctrl-x ctrl-c
cut: ctrl-k
yank(paste): ctrl-y
search: ctrl-s
reduce text size: ctrl x -
Window Management
split window top/bottom: ctrl x 2
split window left/right: ctrl x 3
remove all window splits: ctrl x 1
close a window: ctrl x 0
move cursor to next window: ctrl x o
open directory: ctrl-x d
File Management
oppen file in window buffer: ctrl-x ctrl-f
cycle window buffer: ctrl x right/left arrow
kill buffer: ctrl x k
new window: ctrl x 5 2
latex: ctrl c ctrl c
goto top of file: Alt <
goto a line: type Esc x, then type "goto-line", then hit
enter, then type the line number
delete a lot of text: Ctrl+Space to mark, move cursor; Ctrl+w to remove text -- use with Alt+>
Rectangular Cut and Paste
Step 1: Select the rectangle of text to cut
1)Put cursor at upper left corner
2)Ctrl-Space
3)Put cursor at bottom rigtht corner
or, just use the mouse
Step 2: Cut and paste
4)ctrl-x r k (to cut)
5)ctrl-x r y (to paste)
Search and Replace
Esc-% (i.e. Esc+shit+5)
hit enter
type the string you would like to search for
hit enter
type the string you want to replace it with
hit enter
use space bar to step through the replacement.
del - skip one
! - replace all
. - replace 1 and quit
Auto Format
Esc q
Auto tab format entire code file
M-x find-file /path/to/file RET
C-x h (M-x mark-whole-buffer)
C-M-\ (M-x indent-region)
Other
Python bulk group indent: Ctrl-C > (note ">" requires using the Shift key)