[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tabs and Spaces
From: |
B Smith-Mannschott |
Subject: |
Re: Tabs and Spaces |
Date: |
Mon, 25 May 2009 18:15:48 +0200 |
On Mon, May 25, 2009 at 12:48, Chris Gordon-Smith
<use.address@my.homepage.invalid> wrote:
> Hello All
>
> I have recenly started using emacs for programming, after years using
> KDevelop. One problem I have is indenting code. I have my own indentation
> style. and ideally I would like to setup emacs to support it automatically.
> However, in the short term I'll settle for having emacs convert a TAB
> keypress into the correct number of spaces to fill whitespace up to the
> next tabstop.
>
> At the moment I have
>
> (global-set-key (kbd "TAB") 'self-insert-command)
>
> in my .emacs to force insertion of a tab, but I have to keep invoking
> untabify manually (otherwise my code looks misaligned when I upload it to
> Google Code).
>
> Can anyone help.
Parital solution:
By default, emacs has a nasty habit of indenting with a mix of tabs
and spaces. you can disable this by setting indent-tabs-mode to nil.
You can do this via M-x customize-apropos or by sprinkling this bit of
elisp into your .emacs:
(setq-default
indent-tabs-mode nil ;;; http://www.emacswiki.org/cgi-bin/wiki/TabsAreEvil
)
// Ben
- Re: Tabs and Spaces, (continued)
- Re: Tabs and Spaces, Chris Gordon-Smith, 2009/05/25
- Re: Tabs and Spaces, Pascal J. Bourguignon, 2009/05/25
- Re: Tabs and Spaces, Chris Gordon-Smith, 2009/05/26
- Re: Tabs and Spaces, Teemu Likonen, 2009/05/25
- Re: Tabs and Spaces, Chris Gordon-Smith, 2009/05/26
- Re: Tabs and Spaces, Pascal J. Bourguignon, 2009/05/25
- Re: Tabs and Spaces, Pascal J. Bourguignon, 2009/05/25
- Re: Tabs and Spaces, Richard Riley, 2009/05/25
- Re: Tabs and Spaces, Pascal J. Bourguignon, 2009/05/25
- Re: Tabs and Spaces, Richard Riley, 2009/05/25
Re: Tabs and Spaces,
B Smith-Mannschott <=
RE: Tabs and Spaces, Drew Adams, 2009/05/25
Message not available
Message not available
Re: Tabs and Spaces, Chris Gordon-Smith, 2009/05/26