[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: having problems with indentation in c++-mode
From: |
luca . pamparana |
Subject: |
Re: having problems with indentation in c++-mode |
Date: |
Sun, 8 Feb 2009 03:06:49 -0800 (PST) |
User-agent: |
G2/1.0 |
On Feb 8, 10:07 am, Alan Mackenzie <a...@muc.de> wrote:
> luca.pampar...@gmail.com wrote:
> > Hello everyone,
> > I would like to set the indentation level to 4 characters and I am
> > having trouble achieving this in the c++-mode. I have looked on the
> > web and used the most common template that is found but the smart
> > indentation always indents at 2 spaces...no matter what I set the tab-
> > width or the indent level.
>
> [ .... ]
>
> > I can set the tab-width or the indent-level to whatever number but it
> > does not help. It always indents at 2 spaces.
>
> > I am an emacs newbie, so I am sure I have missed something basic. I
> > would be grateful for any help you might give me.
>
> The magic document is the CC Mode manual, chapter "Getting Started".
>
> The variable you need to set is `c-basic-offset'. Here's what this fine
> manual says:
>
> c-basic-offset
> This Lisp variable holds an integer, the number of columns CC Mode
> indents nested code. To set this value to 6, customize
> `c-basic-offset' or put this into your `.emacs':
>
> (setq c-basic-offset 6)
>
> If you can't get this working, come back again.
>
> Best of luck!
>
> > Cheers,
> > Luca
>
> --
> Alan Mackenzie (Nuremberg, Germany).
That works. You are awesome!
Thanks,
Luca