CSSE2310 / CSSE7231 - Editor Resources

Vi and Emacs

It is strongly recommended that you become familiar with one (or both) of the main terminal-based text editors found on many UNIX systems: vi and/or emacs. There are many different versions of each, including those which work in a graphical (windowing) environment and those which just work in a terminal window.

Documentation

How to run the programs on ITEE servers?

  • To start vi in a terminal window, you can type vim (for vi "improved") or just vi followed by the name of the file to be edited. vim is an updated version of vi and it is recommended that you use this instead of vi. gvim is the graphical version.
  • To start GNU emacs, type emacs. This will start the graphical version if you have an X display or the terminal version if you don't. emacs -nw will always start the terminal version. There is also xemacs available.

Windows and other versions of both programs are available (see the resources links below).

How to learn one or the other?

The easiest way to start learning vi/emacs is to run the program and start an online tutorial. On agave.students.itee.uq.edu.au you can run one of the following commands:

  • Vi: vimtutor - this runs vim (vi "improved") with a tutorial that you can work through
  • Emacs: run the command emacs and type Control-h t (i.e. Control-h followed by lowercase t) - this runs the built in tutorial

The textbook (Glass & Ables) also has a brief introduction to both editors - see pages 57 to 75.

Which is better?

Well that's a religious argument that has been going on for years (decades now!). They both have their advantages and disadvantages. You can find many websites which compare and contrast the two, e.g.

Vi resources

Emacs resources