help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can emacs open a new line below or above the current line?


From: Dieter Wilhelm
Subject: Re: Can emacs open a new line below or above the current line?
Date: Thu, 21 Dec 2006 14:34:32 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Ronald <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]