Emacs

I try to use emacs as little as possible and instead use my editor of choice, but there are some task for which I still prefer to use this editor e.g. report writing in LaTeX.

Since no one from my previous university project groups have been able to search the internet for information on how to use and setup emacs, I've chosen to write the information I've collected on this page.

Setup

Emacs allows the user to specify almost every imaginable configuration option and thus setup the editor to suit your needs and no longer allow your self to yell at it because it doesn't do what you want it to do.

If you can't figure out how to use it - change it so you can.

Indenting code
Indent code with 4 spaces when using automatic indent.

(setq-default indent-tabs-mode nil)
(setq c-indent-level 4)

Tips and shortcuts

Vertical selection:
Mark from start column in first row to end column in last row and then hit
C-x r-k

Opening af file in a new frame
C-x 4 f

Opening another buffer in a new frame
C-x 4 b (select buffer)

Searching
C-s <search string>

Emacs will jump foward to the first occurence and you can then jump forward to the next by hitting C-s again.