From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.help Subject: Re: Don't you think this would be a nice feature? (Place holder) Date: Sun, 28 Sep 2008 00:58:14 +0200 Organization: FH-Trier Message-ID: <1222556550.812026@arno.fh-trier.de> 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; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1222558848 1786 80.91.229.12 (27 Sep 2008 23:40:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Sep 2008 23:40:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 28 01:41:47 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 1KjjQ0-0001m1-If for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Sep 2008 01:41:44 +0200 Original-Received: from localhost ([127.0.0.1]:47031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjjOx-00029L-J8 for geh-help-gnu-emacs@m.gmane.org; Sat, 27 Sep 2008 19:40:39 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed.freenet.de!news.tu-darmstadt.de!news.belwue.de!news.uni-kl.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: 143-93-54-11.arno.fh-trier.de Original-X-Trace: news.uni-kl.de 1222556564 20298 143.93.54.11 (27 Sep 2008 23:02:44 GMT) Original-X-Complaints-To: usenet@news.uni-kl.de Original-NNTP-Posting-Date: Sat, 27 Sep 2008 23:02:44 +0000 (UTC) User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) In-Reply-To: <5cc115cf-bf80-4675-886c-cb157440fe6e@n38g2000prl.googlegroups.com> Cache-Post-Path: arno.fh-trier.de!unknown@dslb-084-059-111-155.pools.arcor-ip.net X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) Original-Xref: news.stanford.edu gnu.emacs.help:162807 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:58148 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! > > > Weiwei > > > There are better ways in emacs to do this, instead of inserting literal text. For example using text properties to mark regions of interest (`jumpspots'). I am not familiar with the various abbrev/template packages, but I could imagine that at least some of them are taking advantage of this. -ap