From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help Subject: Re: Don't you think this would be a nice feature? (Place holder) Date: Sat, 27 Sep 2008 17:49:21 +0200 Message-ID: <48DE5601.7060709@gmail.com> References: <5cc115cf-bf80-4675-886c-cb157440fe6e@n38g2000prl.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1222530612 22765 80.91.229.12 (27 Sep 2008 15:50:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Sep 2008 15:50:12 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Weiwei Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 27 17:51:09 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kjc4Y-00006D-A1 for geh-help-gnu-emacs@m.gmane.org; Sat, 27 Sep 2008 17:51:06 +0200 Original-Received: from localhost ([127.0.0.1]:37150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kjc3V-0006Mz-Sr for geh-help-gnu-emacs@m.gmane.org; Sat, 27 Sep 2008 11:50:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kjc37-0006GY-At for help-gnu-emacs@gnu.org; Sat, 27 Sep 2008 11:49:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kjc35-0006CF-8y for help-gnu-emacs@gnu.org; Sat, 27 Sep 2008 11:49:36 -0400 Original-Received: from [199.232.76.173] (port=33625 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kjc34-0006B9-FB for help-gnu-emacs@gnu.org; Sat, 27 Sep 2008 11:49:34 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:38912) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kjc33-0003ag-5V for help-gnu-emacs@gnu.org; Sat, 27 Sep 2008 11:49:33 -0400 Original-Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:62487 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Kjc2w-0002RY-4N; Sat, 27 Sep 2008 17:49:29 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <5cc115cf-bf80-4675-886c-cb157440fe6e@n38g2000prl.googlegroups.com> X-Enigmail-Version: 0.95.7 X-Antivirus: avast! (VPS 080926-0, 2008-09-26), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1Kjc2w-0002RY-4N. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Kjc2w-0002RY-4N 9cf44394c8cb5fbaa81d290755eb6325 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6? (barebone, rare!) 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:58139 Archived-At: Weiwei wrote: > Hi guys, > > I'm a Emacs newbie, just jumped into it from Vim. I'm using AUCTeX to > write LaTeX files. In Vim, it has a very nice feature -- placeholder. > For example, you have the following skeleton in inserting figures: > > \begin{figure}[H] > \centering > \subfigure[]{\includegraphics[width=3.1in]{}} > \subfigure[]{\includegraphics[width=3.1in]{}} > \caption{} > \label{fig:} > \end{figure} > > Now your cursor is in the third line between the first square brackets > [], after you type something, you want to jump to the brackets at the > end of the same line {}, and so forth. Vim LaTeX suite has this > function with a single key-stroke. In AUCTeX, I didn't find such one, > or maybe I missed it. Could anybody kindly point it to me if it > exists? > > Now lets look at this feature a little bit further. Can we have (Or do > we already have) a universal place-holder in Emacs? For example, we > have a block of text/program as this: > > foofoofoo<>foofoofoofoofoofoofoofoofoofoofoofoo > foo<>foofoofoofoofoofoofoo<>foofoofoofoofoofoo > foofoofoofoofoo<>foofoofoofoofoofoofoofoofoofoo > > The <> indicates a place-holder in which you want to jump quickly. The > function I proposed is to find next <>, and then delete the left "<" > and right ">", and leave cursor there. > > I'm not sure if any similar functions are already there. I think it > should be easy with regular expressions. Simply I'm not a regexp guy. > What do you guys think? And anybody want to have a try? Thanks! Hi Weiwei Maybe this page is will help http://www.emacswiki.org/cgi-bin/wiki/CategoryTemplates