From: Greg P. <gp...@us...> - 2005-10-29 18:34:15
|
Julian Seward writes: > It's pretty much as you see. The 3-space indent seems to be > pretty good for readability. I'm pretty clueless with emacs and > have always found its alternative ideas of indentation a pain, > so when it's done inserting tabs and generally messing around, > I reindent it by hand, getting rid of tabs and inserting spaces > instead. Add this to your .emacs file: (add-hook 'c-mode-common-hook #'(lambda () ;; Use 3 space indent by default (setq c-basic-offset 3) ;; Never insert tab characters when indenting (setq indent-tabs-mode nil) ) ) There's also `M-x untabify`, which changes all tab characters to spaces in the current selection. I use four-space indent by default, so I set up a command that switches between three and four when I'm working on Valgrind sources. -- Greg Parker gp...@us... |