Starting emacs

If you start emacs from the command line (by typing emacs), then if emacs-x11 is installed and X is running, you will see something like Figure 11-8.

If you want to start emacs in an xterm or konsole window, type:

emacs -nw

The -nw option (think no window) prevents it from starting in its own window and forces it to run in text mode inside the xterm or konsole window. You will see something like Figure 11-9.

emacs starting in X

emacs starting in X

FIGURE 11-9

emacs -nw starting emacs -nw starting

It is more likely that you will want to start emacs by opening a particular file. To do that, type the following:

emacs file or emacs -nw file

If the file that you name does not exist, it will be created when you first save the file.

You can then start editing the file. What you type will instantly appear in the editing buffer, which you see (unlike in vi where you need to switch to INSERT mode to start editing). Just doing "what comes naturally'' will work fine now: the arrow keys or the mouse will reposition the cursor as expected and the Backspace key will delete backward while the Delete key will delete forward.

Was this article helpful?

0 0

Post a comment