Justin Hall's personal site growing & breaking down since 1994

watch overshare: the links.net story contact me

emacs for newbies


Why teach emacs? Because it's the one I know. Because it's the one I have the cheat sheet for. Because it's popular enough to be accessable to many of you.

Why edit online? Because it's faster and more direct. Save a file, and your changes are there, for millions to access. No fuss no muss with making sure the copy you have on your hard drive is up to date, or uploaded yet, etc. The drawback - no backups. So, do it yourself!

plus, editing online, without a html preditor, you can work on your web pages from anywhere you can get on the net.

along these lines, you can also use vi, or pico.
To open a file in emacs, type emacs and the name of file to edit at the unix prompt:

>emacs index.html

You'll know you're in emacs when a black bar with the file name comes up at the bottom of your screen. Once you are in emacs, you should be able to use the arrow keys to navigate, as you would on a PC word processor.
(If you have trouble with the delete key, or the arrow keys, check your terminal settings, both on your PC, and on the unix machine you're jacked into).
The funky stuff in emacs is done with the control and the escape key. Execute commands by either holding the control and then hitting another key, or hitting the escape key (not holding it down), and then another key.

To save: control-x, control-s
To exit: control-x, control-c

Forward search: control-s
Backward search: control-r

To page down: control-v
To page up: escape-v

Beginning of a line: control-a
End of a line: control-e

emacs is real powerful, actually. You can do stuff like multiple documents:
find document: control-x, control-f
switch between opened documents: control-x, b
and search and replace, which seems like the most complicated thing I know how to do.
escape-x, type repl, hit return, type str, hit return, and then the thing to search, and the thing to replace.
If you've got all that, you've got about as much as I do. That's all I need to be doing all my pages in emacs!

more emacs info

personal publishing | net rants | justin's links

justin's links | www.links.net

justin hall | <justin at bud dot com>