Afternoon Module 1, Part 2
Using emacs
by Jesse Banning and Professor Lemone
Introduction
We will be using emacs as our text editor.
An editor is used to create documents especially programs. We will be using the emacs editor to create our web pages.
Starting EMACS
To start emacs, type emacs
FileName,
where FileName is the name of the file you are creating or editing
(changing).
Exiting EMACS
To exit emacs, type <ctrl > x
<ctrl > c. That is, hold down the
<ctrl > key and type x and then c.
You'll be asked if you want to save the program. You'll probably want to say y for "yes".
Entering Text
Once emacs has started, you can type in text. Using the arrow keys will allow
you to move around in the file.
Deleting Text
<ctrl > k
will delete everything from the cursor
until the end of the line.
UnDeleting Text
<ctrl > y
will put previously
deleted text back.
Cutting and Pasting
The previous two commands,
<ctrl > k and <ctrl > y
can be used to cut and paste text.
Finding Text
<ctrl>\ puts the message
I-Search at the bottom of the screen. Then you
can type in the text you are searching for. Repeating
<ctrl >\ finds the next occurrence.
Inserting Files
To insert a file at the current cursor position, type
"C-x i" you will be prompted for a name.
Saving Files
"C-x s" lets you save the file without exiting.
Unix Lab Exercises