unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Can emacs open a new line below or above the current line?
Date: Thu, 21 Dec 2006 14:34:32 +0100	[thread overview]
Message-ID: <87vek574pj.fsf@hans.local.net> (raw)
In-Reply-To: <emde38$tr9$1@news.yaako.com> (Ronald's message of "Thu\, 21 Dec 2006 15\:45\:30 +0800")

Ronald <followait@163.com> writes:

> 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.

"C-M-o" is your friend.

(when you're--as in b.-- at the indentation, otherwise: "M-m C-M-o" or
as you probably meant: "C-j C-p TAB" )

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

  parent reply	other threads:[~2006-12-21 13:34 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
     [not found] ` <mailman.2176.1166693025.2155.help-gnu-emacs@gnu.org>
2006-12-21  9:47   ` Ronald
2006-12-21 13:34 ` Dieter Wilhelm [this message]
     [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=87vek574pj.fsf@hans.local.net \
    --to=dieter@duenenhof-wilhelm.de \
    --cc=help-gnu-emacs@gnu.org \
    /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).