From: Alan Mackenzie<none@example.invalid>
Subject: Re: Vim like auto indent mode
Date: Thu, 20 May 2004 08:20:43 +0000 [thread overview]
Message-ID: <roph8c.q5.ln@acm.acm> (raw)
In-Reply-To: mailman.6202.1084952911.1061.help-gnu-emacs@gnu.org
Ding Lei <dinglei@ipanel.cn> wrote on Wed, 19 May 2004 15:55:00 +0800:
> Hello folks,
> 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. For
> example, When I type:
> for (;;;) {
> Emacs should indent by one tab, but actually it now will indent
> only after I type the semicolon.
> Any Ideas ? Thanks in advance.
I take it you mean you want Emacs to indent the _new_ line after pressing
<return>, not the line with the "for (;;;) {". Do one of the following:
(i) On the new line, you can use <tab> at any time to indent the line;
(ii) If you use C-j instead of <return> it should do what you want, but
you probably won't like typing C-j all the time )-;
(iii) Bind <return> to what you want, by putting this into your .emacs:
(eval-after-load "cc-mode"
'(define-key c-mode-base-map "\C-m" 'c-context-line-break))
> D i n g L e i
--
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").
next prev parent reply other threads:[~2004-05-20 8:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.6202.1084952911.1061.help-gnu-emacs@gnu.org>
2004-05-19 12:24 ` Vim like auto indent mode David Hansen
2004-05-20 8:20 ` Alan Mackenzie [this message]
2004-05-19 7:55 Ding Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=roph8c.q5.ln@acm.acm \
--to=none@example.invalid \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.