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

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

Re: how to change the indentation style of emacs


From: rusi
Subject: Re: how to change the indentation style of emacs
Date: Sun, 23 Jan 2011 01:37:24 -0800 (PST)
User-agent: G2/1.0

On Jan 22, 8:22 pm, Anand Dhanakshirur <adhanakshi...@yahoo.com>
wrote:
> Hi,
> I am using emacs for c and c++ files.
>
> 1. Presently(default), In a C program,
> after "for" loop, the next line(the next line starting with
> "{" is indented(shifted) by 2 spaces.
> I want to change this.
> I want the next line is not shifted by 2 spaces when i press TAB key.(for 
> indentation)
> basically
> Now it is, for (i=0;i<10; i++)
>              {
>              }
>
> I want this to be changed as
>            for (i=0; i<10;i++)
>
> 2 .One more thing want to do.
> after opening for loop of if condition,
> the next line is getting shiftedby 2 spaces.
> I want the next line to be shifted by 4 spaces.
>
> How to do these 2 things?

Have you seen and tried http://www.emacswiki.org/emacs/IndentingC
(especially different styles)?


reply via email to

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