Our .emacs

If you would like to follow our Code Standards automatically while using Emacs a good choice is to utilize our .emacs file. You can get that file here. You will need to rename it to ~/.emacs. You also need to get the smooth-scrolling.el (
smooth-scrolling.txt
) and put it in ~/.emacs.d/lisp/smooth-scrolling.el. If the directory ~/.emacs.d/lisp does not exist, you will need to create it.

Useful Behavior

IDO mode (Interactive DO) is EXTREMELY useful. Once you get used to it you will never go back to the old way. Opening files and switching buffers (Remember to use C-x b) Turn it on by doing:

(ido-mode t)

Some ido-mode customizations that I always use are:

Enable flexible matching of files (you don't have to type the name exactly right to have ido-mode complete it.)

(setq ido-enable-flex-matching t)

Ignore certain files when using C-x C-f or C-x b (I like to ignore the auto-generated dependency files we have in MOOSE, for example, and you can still get to the ignored files by typing e.g. .d manually...):

(setq ido-ignore-files '("\\.d$"))

CUA mode makes it so that the normal Cut/Copy/Paste key combos work (ie C-x,C-c,C-v respectively). It also makes it so that you can do Shift-(direction) for highlighting things (just like you can in all other applications. Finally, it also enables "rectangular marking" by pressing C-(Enter) and then moving around. To turn it on do:

(cua-mode t)

If on a Mac and you prefer to use the normal Mac binding keys try this instead [http://www.emacswiki.org/cgi-bin/emacs-en/MacKeyMode]

Compiling

This is a collection of functions and key defines that allow you to compile inside of Emacs and jump directly to errors/warnings. By default, to compile, press F8 (For Debug compiling use Shift-F8). To go to the next error press F9 and the previous error is F7 (Note that on Mac keyboards this corresponds to Play, Skip, Skip Back buttons...). When you press F8 it will automatically search upwards to find the nearest Makefile to the file you are currently editing, then run Make.