[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vim like auto indent mode
From: |
David Hansen |
Subject: |
Re: Vim like auto indent mode |
Date: |
Wed, 19 May 2004 14:24:34 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
On Wed, 19 May 2004 15:55:00 +0800 Ding Lei wrote:
> Under JDE/C++/C mode, Emacs will auto indent upon some symbols like an
> ending parenthess("{") or a semi-colon, but I really hope that it will
> auto indent immediately I press the return key.
Is this doing what you want?
(add-hook 'c-mode-common-hook
(lambda ()
(define-key c-mode-map
"\C-m" 'reindent-then-newline-and-indent)))
I wonder why this isn't it the default in modes for programming
languages.
-- David