all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Don't you think this would be a nice feature? (Place holder)
Date: Sun, 28 Sep 2008 00:58:14 +0200	[thread overview]
Message-ID: <1222556550.812026@arno.fh-trier.de> (raw)
In-Reply-To: <5cc115cf-bf80-4675-886c-cb157440fe6e@n38g2000prl.googlegroups.com>

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


  parent reply	other threads:[~2008-09-27 22:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-27 15:28 Don't you think this would be a nice feature? (Place holder) Weiwei
2008-09-27 15:49 ` Lennart Borgman (gmail)
2008-09-27 16:01 ` harven
2008-09-27 16:12   ` Weiwei
2008-09-27 22:58 ` Andreas Politz [this message]
2008-09-27 23:52 ` Tim X
2008-09-28  2:31   ` Weiwei
2008-09-28  6:37     ` Tim X
2008-09-28  7:58       ` Nicolas Goaziou
2008-09-28 11:41     ` Martin Dahl
     [not found]     ` <mailman.20110.1222608284.18990.help-gnu-emacs@gnu.org>
2008-09-28 16:48       ` Weiwei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1222556550.812026@arno.fh-trier.de \
    --to=politza@fh-trier.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.