Being Productive With Emacs

http://stuff.mit.edu/iap/2009/emacs/

Phil Sung

MIT, CSAIL; psung@alum.mit.edu

Emacs is the extensible,
customizable,
self-documenting
real-time display
editor.

The many faces of Emacs

Emacs is an editor for code

Emacs is a file manager (M-x dired)

Emacs is a terminal emulator (M-x shell)

Emacs shows diffs (M-x ediff)

Emacs is an IDE (M-x gdb)

Emacs is a PDF viewer

Emacs is a mail/news/RSS reader (M-x gnus)

Emacs plays Tetris (M-x tetris)

Why Emacs? (1)

Why Emacs? (2)

Agenda

A primer

It's all about text manipulation

Text as a metaphor: dired

Moving around in buffers (1)

Moving around in buffers (2)

Beginning, end of lineC-aC-e
By wordM-bM-f
By sentenceM-aM-e
By paragraphM-{M-}
By screenM-vC-v
Beginning, end of bufferM-<M->
Go to specific line numberM-g g

Moving around in buffers (3)

Killing (cutting) text

Delete characterC-d or DEL
Kill lineC-k
Kill wordM-d
Kill sentenceM-k
Kill regionC-w
Save region without killingM-w
Kill ("zap") to next occurrence of characterM-z

Yanking (pasting) text

YankC-y
Yank earlier killed textM-y

The kill ring: almost all commands which delete text save it for possible later retrieval

The mark

The mark

Undo

Macros

Macros

Macros

M-dKill first word
C-dDelete subsequent character
M-uUppercase next word and move past it
,Insert a comma
SPCInsert a space
C-yYank deleted word
C-fMove to beginning of next line

Macros

Incremental search

Search history

Searching and replacing

Regular expression search

Regexp search and replacement

Regexp replacement example

Integration with useful tools

Miscellaneous features

Miscellaneous features

Major modes

Language major mode features

Minor modes

Getting help with Emacs

Getting help with Emacs

"In the event of an emergency"

Next steps

Resources

Emacs is the extensible,
customizable,
self-documenting
real-time display
editor.

Review

Next week...