From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: Can emacs open a new line below or above the current line? Date: Thu, 21 Dec 2006 14:34:32 +0100 Organization: The Church of Emacs Message-ID: <87vek574pj.fsf@hans.local.net> References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1166708106 5109 80.91.229.10 (21 Dec 2006 13:35:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Dec 2006 13:35:06 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 21 14:35:04 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GxO4a-0006DR-R6 for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Dec 2006 14:35:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GxO4a-00061x-8u for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Dec 2006 08:35:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GxO4D-0005yP-38 for help-gnu-emacs@gnu.org; Thu, 21 Dec 2006 08:34:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GxO4C-0005xu-7B for help-gnu-emacs@gnu.org; Thu, 21 Dec 2006 08:34:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GxO4B-0005xO-UJ for help-gnu-emacs@gnu.org; Thu, 21 Dec 2006 08:34:36 -0500 Original-Received: from [212.227.126.171] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GxO4B-0007xW-3G for help-gnu-emacs@gnu.org; Thu, 21 Dec 2006 08:34:35 -0500 Original-Received: from [84.167.29.177] (helo=duenenhof-wilhelm.de) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis), id 0MKwtQ-1GxO473QWx-0006wL; Thu, 21 Dec 2006 14:34:32 +0100 Original-Received: by duenenhof-wilhelm.de (Postfix, from userid 1000) id F093A76744; Thu, 21 Dec 2006 14:34:32 +0100 (CET) Original-To: Ronald In-Reply-To: (Ronald's message of "Thu\, 21 Dec 2006 15\:45\:30 +0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:d7ab225b98a136e1c2910381f940ecb9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39807 Archived-At: Ronald 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