[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indentation in C
From: |
Vivek Dasmohapatra |
Subject: |
Re: Indentation in C |
Date: |
22 Jan 2004 11:21:10 +0000 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 |
vsinha@purdue.edu (Varun Sinha) writes:
> I was wondering how I could get the following done in EMACS-
> 1) When I hit tab to indent, I'd like the tab to be made up of spaces.
M-x customize-variable RET indent-tabs-mode RET
Set it to off (nil).
> 2) Right now, the curly braces are indented two spaces below the
You can alter the indentation style by calling c-set-style
M-x c-set-style RET
You will can tab complete the available styles - BSD style is
sounds close to what you want.
You can control the amount of indentation by setting c-basic-offset
M-x customize-variable RET c-basic-offset RET
and setting it to 4.
You can find a much more detailed example in
http://rtfm.etla.org/emacs/dot.html
look for "(defvar viveks-c-style" and "(setq c-mode-common-hook"