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: David Hansen
Subject: Re: Can emacs open a new line below or above the current line?
Date: Thu, 21 Dec 2006 10:15:40 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux)

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





reply via email to

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