Emacs Mini Tutorial

I've seen the huddled masses escaping through VI, pondering the latest vagaries of ce and just trying to quit out of ed. Being one of those in the light, I thought it was time I brought forth some information on that most holy editor,EMACS! NO, do NOT run in fear, it is not so bad as you've heard! NOTE: There are ports of Xemacs to almost every possible platform, including Windows95, NT, Linux and other Unix's.

Looks like someone created a more complete Emacs Beginner's Tutorial here.

If you are just getting started (and wish to use my settings), here is what you do:

You should now be ready to run xemacs. Try viewing your ~/.xemacs/init.el file, or any other text file or source code you have laying around.

Why you should not Fear Emacs

Emacs is possibly the most powerful editor around. That said, it is almost certainly the most complicated! The complication is in the setup however: once you get your .xemacs/init.el file set up, the battle is almost won. I offer several sample .xemacs (including the one I use every day.) towards the end. All you'll need to do is copy one to your home directory.

Key Combinations

The next great complaint you hear from people (mostly vi users of all people) is "How am I ever supposed to remember all those key combinations!!??" This is most certainly a valid question. Or wrather, was a valid question back in the days of vt100 screens. Today, xemacs is fully X aware and with the drop down menus and accelerator keys programmed into the .xemacs file, there is almost no need for arcane key combinations, even though they still work of course.

Quick list of Key combinations

NOTE: ctrl-x means hold ctrl down and press x, if something follows, then press it after you have pressed the first two. For example: ctrl-x 1 means press ctrl, press x, release both, press 1. Commas seperate equivalent combinations. For example: ctrl-x s, F7 means that the F7 key does the same thing as ctrl-x s.

Benefits of Emacs: Color coding of source code.

Now, everyone is already comfortable with SOME editor, so why should they change to emacs? First and foremost, it is designed for programmers. Almost every kind of source code imaginable will be color coded. Of special interest may be the java and c/c++ color schemes. It also colorizes HTML code, although not quite as well java or c++.

Benefits of Emacs: Integrated Compilation.

If you compile from within emacs, you get the added benefit of being able to click on the offending error in the compile-output window. You will then be taken to that line in your source code. Much more can be done along this line, but leave that for more advanced documentation.

Quick list of Nice Features and Hints.

Screen Captures of Various Modes

Java Mode

C++ Mode

HTML Mode


Ben Greear
Last modified: Fri Jul 2 15:34:02 PDT 2021