unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* jump to place holder and mapping
@ 2005-03-30 15:05 Fabian Braennstroem
  2005-03-31  7:27 ` Fabian Braennstroem
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Braennstroem @ 2005-03-30 15:05 UTC (permalink / raw)


Hi,

I am trying 'vim' for a while now and actually like the
jumping to place holders indicated by '<++>' with 'C-j'. It
is very usefull, when you have small macro/abbreviations
including these place holders; e.g. in latex there exist a
macro:

\frac{<++>}{<++>}<++>

So you are able to complete quickly the fraction.

Furthermore, defining those 'macros' is pretty easy in vim
with the 'imap' funtion; so writing in insert-mode some
special shortcut, it expands to the wanted output with those
place holders. 

Does anybody have an idea how to achive this with emacs?
Maybe, there is even a package for that!?

Greetings, Fabian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: jump to place holder and mapping
  2005-03-30 15:05 jump to place holder and mapping Fabian Braennstroem
@ 2005-03-31  7:27 ` Fabian Braennstroem
  2005-03-31 17:00   ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Braennstroem @ 2005-03-31  7:27 UTC (permalink / raw)


Hi,

On 2005-03-30, Fabian Braennstroem <fab@ddorf.de> wrote:
>  Hi,
> 
>  I am trying 'vim' for a while now and actually like the
>  jumping to place holders indicated by '<++>' with 'C-j'. It
>  is very usefull, when you have small macro/abbreviations
>  including these place holders; e.g. in latex there exist a
>  macro:
> 
>  \frac{<++>}{<++>}<++>
> 
>  So you are able to complete quickly the fraction.
> 
>  Furthermore, defining those 'macros' is pretty easy in vim
>  with the 'imap' funtion; so writing in insert-mode some
>  special shortcut, it expands to the wanted output with those
>  place holders. 

I just found 'tempo'. I think that should work for this, but
I can't find anything like placeholders...
 
>  Does anybody have an idea how to achive this with emacs?
>  Maybe, there is even a package for that!?
> 
>  Greetings, Fabian

Greetings, Fabian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: jump to place holder and mapping
  2005-03-31  7:27 ` Fabian Braennstroem
@ 2005-03-31 17:00   ` Kevin Rodgers
  2005-03-31 17:43     ` Fabian Braennstroem
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2005-03-31 17:00 UTC (permalink / raw)


Fabian Braennstroem wrote:
 > On 2005-03-30, Fabian Braennstroem <fab@ddorf.de> wrote:
 >> I am trying 'vim' for a while now and actually like the
 >> jumping to place holders indicated by '<++>' with 'C-j'. It
 >> is very usefull, when you have small macro/abbreviations
 >> including these place holders; e.g. in latex there exist a
 >> macro:
 >>
 >> \frac{<++>}{<++>}<++>
 >>
 >> So you are able to complete quickly the fraction.
 >>
 >> Furthermore, defining those 'macros' is pretty easy in vim
 >> with the 'imap' funtion; so writing in insert-mode some
 >> special shortcut, it expands to the wanted output with those
 >> place holders.
 >
 > I just found 'tempo'. I think that should work for this, but
 > I can't find anything like placeholders...

Isn't that exactly what is meant by the "points of interest"?

;; A template is defined as a list of items to be inserted in the
;; current buffer at point. Some of the items can be simple strings,
;; while other can control formatting or define special points of
;; interest in the inserted text.

;; If a template defines a "point of interest" that point is inserted
;; in a buffer-local list of "points of interest" that the user can
;; jump between with the commands `tempo-backward-mark' and
;; `tempo-forward-mark'. If the template definer provides a prompt for
;; the point, and the variable `tempo-interactive' is non-nil, the
;; user will be prompted for a string to be inserted in the buffer,
;; using the minibuffer.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: jump to place holder and mapping
  2005-03-31 17:00   ` Kevin Rodgers
@ 2005-03-31 17:43     ` Fabian Braennstroem
  0 siblings, 0 replies; 4+ messages in thread
From: Fabian Braennstroem @ 2005-03-31 17:43 UTC (permalink / raw)


On 2005-03-31, Kevin Rodgers <ihs_4664@yahoo.com> wrote:
>  Fabian Braennstroem wrote:
>  > On 2005-03-30, Fabian Braennstroem <fab@ddorf.de> wrote:
>  >> I am trying 'vim' for a while now and actually like the
>  >> jumping to place holders indicated by '<++>' with 'C-j'. It
>  >> is very usefull, when you have small macro/abbreviations
>  >> including these place holders; e.g. in latex there exist a
>  >> macro:
>  >>
>  >> \frac{<++>}{<++>}<++>
>  >>
>  >> So you are able to complete quickly the fraction.
>  >>
>  >> Furthermore, defining those 'macros' is pretty easy in vim
>  >> with the 'imap' funtion; so writing in insert-mode some
>  >> special shortcut, it expands to the wanted output with those
>  >> place holders.
>  >
>  > I just found 'tempo'. I think that should work for this, but
>  > I can't find anything like placeholders...
> 
>  Isn't that exactly what is meant by the "points of interest"?

Yes, thanks!

> 
>  ;; A template is defined as a list of items to be inserted in the
>  ;; current buffer at point. Some of the items can be simple strings,
>  ;; while other can control formatting or define special points of
>  ;; interest in the inserted text.
> 
>  ;; If a template defines a "point of interest" that point is inserted
>  ;; in a buffer-local list of "points of interest" that the user can
>  ;; jump between with the commands `tempo-backward-mark' and
>  ;; `tempo-forward-mark'. If the template definer provides a prompt for
>  ;; the point, and the variable `tempo-interactive' is non-nil, the
>  ;; user will be prompted for a string to be inserted in the buffer,
>  ;; using the minibuffer.

Sorry, was kind of confused.

Greetings, Fabian

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-31 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-30 15:05 jump to place holder and mapping Fabian Braennstroem
2005-03-31  7:27 ` Fabian Braennstroem
2005-03-31 17:00   ` Kevin Rodgers
2005-03-31 17:43     ` Fabian Braennstroem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).