From VMS to Linux HOWTO
Prev |  | Next

# 3. Editing Files

Linux doesn't have `EDT`, but there are scores of editors available. The only one that's guaranteed to be included in every UNIX version is `vi`---forget it, your sysadm must have installed something better. Probably the most popular editor is `emacs`, which can emulate `EDT` to a certain degree; `jed` is another editor that provides `EDT` emulation.

These two editors are particularly useful for editing program sources, since they have two features unknown to `EDT`: syntax hilighting and automatic indentation. Moreover, you can compile your programs from within the editor (command `ESC-X compile`); in case of a syntax error, the cursor will be positioned on the offending line. I bet that you'll never want to use the true blue `EDT` again.

If you have `emacs`: start it, then type `ESC-X edt-emulation-on`. Pressing ALT--X or ESC-X is `emacs`' way of issuing commands, like `EDT`'s CTRL--Z. From now on, `emacs` acts like `EDT` apart from a few commands. Differences:

- don't press CTRL--Z to issue commands (if you did, you stopped `emacs`. Type `fg` to resume it);

- there's an extensive on-line help. Press CTRL-H ?, or CTRL-H T to start a tutorial;

- to save a file, press CTRL-X CTRL-S;

- to exit, press CTRL-X CTRL-C;

- to insert a new file in a buffer, press CTRL-X CTRL-F, then CTRL-X B to switch among buffers.

If you have `jed`: ask your sysadm to configure `jed` properly. Emulation is already on when you start it; use the normal keypad keys, and press CTRL--H CTRL--H or CTRL-? to get help. Commands are issued in the same way as `emacs`'. In addition, there are some handy key bindings missing in the original `EDT`; key bindings can also be tailored to your own taste. Ask your sysadm.

In alternative, you may use another editor with a completely different interface. `emacs` in native mode is an obvious choice; another popular editor is `joe`, which can emulate other editors like `emacs` itself (being even easier to use) or the DOS editor. Invoke the editor as `jmacs` or `jstar` and press, respectively, CTRL-X H or CTRL-J to get online help. `emacs` and `jed` are much more powerful than good ol' `EDT`.

Prev | Home | Next
Short Intro |  | TeXing