next up previous contents
Next: Print Up: Edit Previous: Vi   Contents

Emacs

A very popular editor, to be found on most UNIX systems, is emacs. In the subdepartment we have a menu driven version called xemacs To try it type:-
xemacs myfile -bg white
The -bg white part of the command is not necessary but shows you how to change the screen background.

Once you are in emacs you can click on the Help menu and select Emacs tutorial. If using an emacs without a menu bar, pressing Ctrl H and then T (The Ctrl H means Help and the T means tutorial) will also get you there. As is explained on the very first screen of the tutorial, you can exit emacs by typing Ctrl X and then Ctrl C (or click the File menu and chose Exit emacs).

Here are a few useful commands to get you started (shamelessly copied from the Emacs tutorial). In this table C- means Ctrl e.g. C-f and M- means press Esc (or F11), release it and then press another key e.g. M-f:-
C-f Move forward a character
C-b Move backward a character
   
M-f Move forward a word
M-b Move backward a word
   
C-n Move to next line
C-p Move to previous line
   
C-a Move to beginning of line
C-e Move to end of line
   
M-a Move back to beginning of sentence
M-e Move forward to end of sentence
   
M-$<$ Go to beginning of file
M-$>$ Go to end of file
   
$<$Rubout$>$ delete the character just before the cursor
C-d delete the next character after the cursor
   
M-$<$Rubout$>$ kill the word immediately before the cursor
M-d kill the next word after the cursor
   
C-k kill from the cursor position to end of line
M-k kill to the end of the current sentence
   
C-x C-f Find file.
C-x C-s Save file.
C-x C-b List buffers.
C-x C-c Quit Emacs.
C-x u Undo.


next up previous contents
Next: Print Up: Edit Previous: Vi   Contents
P.D. Gronbech (IT Staff) 2015-10-02