unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Ronald <followait@163.com>
Subject: Re: Can emacs open a new line below or above the current line?
Date: Fri, 22 Dec 2006 06:24:41 +0800	[thread overview]
Message-ID: <emf1j9$fb5$1@news.yaako.com> (raw)
In-Reply-To: <mailman.2179.1166708079.2155.help-gnu-emacs@gnu.org>

Dieter Wilhelm wrote:
> 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" )
> 
C-M-o is really good. Thanks.

  parent reply	other threads:[~2006-12-21 22:24 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
     [not found] ` <mailman.2179.1166708079.2155.help-gnu-emacs@gnu.org>
2006-12-21 22:24   ` Ronald [this message]
  -- 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='emf1j9$fb5$1@news.yaako.com' \
    --to=followait@163.com \
    /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).