17.C: Cutting and Pasting | 17: Emacs | 17.A: Moving |
To insert text in emacs, you need only position your cursor and type. You can use key strokes or the mouse to position yourself in the file.
Watch how the ends of lines wrap around the screen. In emacs there isn't an automatic return when you reach the margin. Instead, the line is wrapped to the next line and marked with a back-slash (\) to show the absence of a carriage return. You can enter returns by hand, or enter M-q to justify the entire paragraph.
To delete single characters in emacs, you can either go to the right of them and backspace them out, or go to the left of them and delete them (sometimes marked DEL). The commands which delete significant amounts of data like words, lines, or sections, are called kill commands (equivalent to cut). You will see these in the next section.
Try replacing the words NAME and DATE in your file using emacs.
If you make an error and wish to undo a command, enter C-x u. Amazingly, this command can be repeated as many times as you have edited the file.
An important eature of emacs is the discard or quit command. This command, which interrupts and discards the last command entered, is useful when you get caught in a long computation which you don't wish to finish. Just type C-g to quit the present command (even while you are in the act of enterring that command).
Now that you know the basic way to enter and remove text in emacs, let's move on to bigger things like cutting and pasting.
17.C: Cutting and Pasting | 17: emacs | 17.A: Moving |