help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indentation in C


From: Yuri Shtil
Subject: Re: Indentation in C
Date: Wed, 21 Jan 2004 13:46:32 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823



Varun Sinha wrote:
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.
I love the way I can hit tab anywhere on a line, and it indents the
line according to the specifications and I don't want to lose that.
The indentation should be two spaces. I was trying some of the
options, but when (I think) I replaced the tabs with spaces, I lost
the ability to tab anywhere in the line and get indentation.

2) Right now, the curly braces are indented two spaces below the
function call or the control statement, like so

function_name
  {
    .........
    .........
  }

but I need the curly braces to not be indented like so

function_name
{
  ...........
  ...........
}

I tried looking through the documentation for EMACS to get these, but
I wasn't able to make sense out of it. Ordinarily, it wouldn't matter
to me, but the professor for my course has laid down these standards.
I tried asking him and the TA, but they all use VI and told me either
to switch (yeah right) or use manual spacing.

Thanks a lot!!

Varun


Look up the variable indent-tabs-mode.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]