From: David Hansen <david.hansen@gmx.net>
Subject: Re: Can emacs open a new line below or above the current line?
Date: Thu, 21 Dec 2006 10:15:40 +0100 [thread overview]
Message-ID: <87zm9hhao3.fsf@localhorst.mine.nu> (raw)
In-Reply-To: emde38$tr9$1@news.yaako.com
On Thu, 21 Dec 2006 15:45:30 +0800 Ronald wrote:
> Better if it can be indented automatically (for example in cc mode).
>
> I get a habit that code the main ones first, and then add on
> the trivialities. For example:
>
> if((n=write(fd,line,n))!=n){
> perror("write error\n"); //second
> exit(-1); //first
> }
>
> This may also applies when I type:
>
> a.
> if(){}
> b.
> if(){
> |} //`|' as the cursor
> c.
> Then I'd like to open a line above indented automatically.
> It normally would be C-j C-p tab. Just too many key strokes.
Not sure though if i understand you right but the electric
features of cc-mode may be interesting for you. In Emacs 22
you can toggle that behavior with C-c C-a.
David
next prev parent reply other threads:[~2006-12-21 9:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-21 7:45 Can emacs open a new line below or above the current line? Ronald
2006-12-21 9:06 ` Mathias Dahl
2006-12-21 9:24 ` Ronald
2006-12-21 9:15 ` David Hansen [this message]
[not found] ` <mailman.2176.1166693025.2155.help-gnu-emacs@gnu.org>
2006-12-21 9:47 ` Ronald
2006-12-21 13:34 ` Dieter Wilhelm
[not found] ` <mailman.2179.1166708079.2155.help-gnu-emacs@gnu.org>
2006-12-21 22:24 ` Ronald
-- strict thread matches above, loose matches on Subject: below --
2006-12-21 13:06 martin rudalics
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zm9hhao3.fsf@localhorst.mine.nu \
--to=david.hansen@gmx.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).