[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Don't you think this would be a nice feature? (Place holder)
From: |
Lennart Borgman (gmail) |
Subject: |
Re: Don't you think this would be a nice feature? (Place holder) |
Date: |
Sat, 27 Sep 2008 17:49:21 +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 |
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