* the v word but not a religious salvo
@ 2009-09-28 20:30 Harry Putnam
2009-09-28 20:44 ` Lennart Borgman
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Harry Putnam @ 2009-09-28 20:30 UTC (permalink / raw
To: help-gnu-emacs
I wondered if anyone here is at all familiar with the different
insertions related plugins for vim?
This is not a plug for vim... Although I am embarrassingly dumb about
elisp, I am a veteran emacs user for over 10 yrs and not looking to
switch this late in the game, but like lots of people I've used vim
most of that time too. Mostly for lighter work like quick edits to
system files. Or to do the same remotely so I can rely only on what
the remote might have onboard.
One vim plugin I've seen in use called xpt looks and sounds very very
useful.
There is a (thankfully short) online demo, you may find it somewhat
poorly done... I did. However it does give a good hint as to the
power of this type of approach to helping programmers along with
inserting oft repeated things and even whole script outlines.
(vim xpt templates plugin)
http://vimeo.com/4449258
I'm not plugging for vim... what I want to ask is if there is any kind
of thing like this available for emacs.
I know about skeletons and have written dozens of them for use in
various places.
And maybe a skeleton can do the advanced things demo'ed in the above
cited demo... if so maybe someone has a few examples I can mess with.
I'm thinking something that not only inserts a chunk but offers more
help at specific points if you signal that you want that.
I guess it would be an `interactive' skeleton... I have no idea how
to write such a thing but I might be able to distort, slaughter and
generally torture some else's coding in such a way as to get what I
want from it.
Otherwise I'd like to know about any packages that do something even
vaguely similar to vim's xpt.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-09-28 20:30 Harry Putnam
@ 2009-09-28 20:44 ` Lennart Borgman
2009-09-29 21:03 ` Harry Putnam
2009-09-29 21:33 ` Harry Putnam
2009-09-28 20:49 ` Matt Lundin
2009-09-29 23:04 ` Shelagh Manton
2 siblings, 2 replies; 13+ messages in thread
From: Lennart Borgman @ 2009-09-28 20:44 UTC (permalink / raw
To: Harry Putnam; +Cc: help-gnu-emacs
On Mon, Sep 28, 2009 at 10:30 PM, Harry Putnam <reader@newsguy.com> wrote:
> I wondered if anyone here is at all familiar with the different
> insertions related plugins for vim?
I am not using it currently, but have you looked at yasnippet
http://www.emacswiki.org/emacs/Yasnippet
It would be interesting to hear how it compare. (Maybe you could add
something on the wiki?)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-09-28 20:30 Harry Putnam
2009-09-28 20:44 ` Lennart Borgman
@ 2009-09-28 20:49 ` Matt Lundin
2009-09-29 23:04 ` Shelagh Manton
2 siblings, 0 replies; 13+ messages in thread
From: Matt Lundin @ 2009-09-28 20:49 UTC (permalink / raw
To: help-gnu-emacs
Harry Putnam <reader@newsguy.com> writes:
> One vim plugin I've seen in use called xpt looks and sounds very very
> useful.
>
> There is a (thankfully short) online demo, you may find it somewhat
> poorly done... I did. However it does give a good hint as to the
> power of this type of approach to helping programmers along with
> inserting oft repeated things and even whole script outlines.
>
> (vim xpt templates plugin)
> http://vimeo.com/4449258
>
> I'm not plugging for vim... what I want to ask is if there is any kind
> of thing like this available for emacs.
I believe you're looking for yasnippet:
http://code.google.com/p/yasnippet/
Best,
Matt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
[not found] <mailman.7665.1254169850.2239.help-gnu-emacs@gnu.org>
@ 2009-09-29 8:55 ` David Kastrup
0 siblings, 0 replies; 13+ messages in thread
From: David Kastrup @ 2009-09-29 8:55 UTC (permalink / raw
To: help-gnu-emacs
Harry Putnam <reader@newsguy.com> writes:
> I'm not plugging for vim... what I want to ask is if there is any kind
> of thing like this available for emacs.
>
> I know about skeletons and have written dozens of them for use in
> various places.
Probably most of the current functionality can be found in
(info "(autotype)")
--
David Kastrup
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-09-28 20:44 ` Lennart Borgman
@ 2009-09-29 21:03 ` Harry Putnam
2009-09-29 21:33 ` Harry Putnam
1 sibling, 0 replies; 13+ messages in thread
From: Harry Putnam @ 2009-09-29 21:03 UTC (permalink / raw
To: help-gnu-emacs
Lennart Borgman <lennart.borgman@gmail.com> writes:
> On Mon, Sep 28, 2009 at 10:30 PM, Harry Putnam <reader@newsguy.com> wrote:
>> I wondered if anyone here is at all familiar with the different
>> insertions related plugins for vim?
>
> I am not using it currently, but have you looked at yasnippet
>
> http://www.emacswiki.org/emacs/Yasnippet
>
> It would be interesting to hear how it compare. (Maybe you could add
> something on the wiki?)
One thing I see right away is that yasnippet has no texinfo
documentation. Its all html. Is that normal? I don't think I've used
a plugin before on emacs... Many packages that do different things
but not any called a `plugin' far as I remember.
I much prefer texinfo documetation. Maybe I'll try to make it from
the html and offer it on the wiki.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-09-28 20:44 ` Lennart Borgman
2009-09-29 21:03 ` Harry Putnam
@ 2009-09-29 21:33 ` Harry Putnam
2009-09-30 0:15 ` Lennart Borgman
1 sibling, 1 reply; 13+ messages in thread
From: Harry Putnam @ 2009-09-29 21:33 UTC (permalink / raw
To: help-gnu-emacs
Lennart Borgman <lennart.borgman@gmail.com> writes:
> On Mon, Sep 28, 2009 at 10:30 PM, Harry Putnam <reader@newsguy.com> wrote:
>> I wondered if anyone here is at all familiar with the different
>> insertions related plugins for vim?
>
> I am not using it currently, but have you looked at yasnippet
>
> http://www.emacswiki.org/emacs/Yasnippet
>
> It would be interesting to hear how it compare. (Maybe you could add
> something on the wiki?)
I can't compare because I haven't used vims xpt but so far I guess I'm
a little bit disappointed.
The docs say you can insert whole templates but when I tried that in
cperl mode... I find most of them aren't anything more than what cperl
already does. There are a few on the list that do more.
But for example... the for loop template inserts a kind of for loop
that isn't near as common this kind... at least in my experience:
for (@ar){
dosomething;
}
Instead it offers:
for (my $var = 0; $var < expression; $var++) {
# body...
}
Which is really a different kind of usage.
I realize you can make your own and edit the defaults... but then I
can already do that with skeletons.
The difference is that you can tab thru the for loop offered and fill
it out all the way ... so that is saying something. But most of the
offerings for perl that isn't true. Or only partly true.
Somehow I guess I expected more.. like a whole starter script being
inserted.
I'm sure I can set that up in yasnippets too, but I already have a
skeleton doing that job.
Hopefully as I work with yasnippets and learn more about it... it will
get better and better.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-09-28 20:30 Harry Putnam
2009-09-28 20:44 ` Lennart Borgman
2009-09-28 20:49 ` Matt Lundin
@ 2009-09-29 23:04 ` Shelagh Manton
2 siblings, 0 replies; 13+ messages in thread
From: Shelagh Manton @ 2009-09-29 23:04 UTC (permalink / raw
To: help-gnu-emacs
On Mon, 28 Sep 2009 15:30:11 -0500, Harry Putnam wrote:
> I wondered if anyone here is at all familiar with the different
> insertions related plugins for vim?
>
> This is not a plug for vim... Although I am embarrassingly dumb about
> elisp, I am a veteran emacs user for over 10 yrs and not looking to
> switch this late in the game, but like lots of people I've used vim most
> of that time too. Mostly for lighter work like quick edits to system
> files. Or to do the same remotely so I can rely only on what the remote
> might have onboard.
>
> One vim plugin I've seen in use called xpt looks and sounds very very
> useful.
>
> There is a (thankfully short) online demo, you may find it somewhat
> poorly done... I did. However it does give a good hint as to the power
> of this type of approach to helping programmers along with inserting oft
> repeated things and even whole script outlines.
>
> (vim xpt templates plugin)
> http://vimeo.com/4449258
>
> I'm not plugging for vim... what I want to ask is if there is any kind
> of thing like this available for emacs.
>
> I know about skeletons and have written dozens of them for use in
> various places.
>
> And maybe a skeleton can do the advanced things demo'ed in the above
> cited demo... if so maybe someone has a few examples I can mess with.
>
> I'm thinking something that not only inserts a chunk but offers more
> help at specific points if you signal that you want that.
>
> I guess it would be an `interactive' skeleton... I have no idea how to
> write such a thing but I might be able to distort, slaughter and
> generally torture some else's coding in such a way as to get what I want
> from it.
>
>
> Otherwise I'd like to know about any packages that do something even
> vaguely similar to vim's xpt.
I've found skeletons to be very flexible and interactive if need be.
I used some quite complex skeletons when I wrote the lilypond-templates
[[http://code.google.com/p/lilypond-templates/]] package. The skeleton
page on the emacs-wiki [[http://www.emacswiki.org/emacs/SkeletonMode]]
has some useful ideas too about using small text filter functions within
a skeleton. Skeletons can also give you choices, and a default if you
choose nothing. So if you don't grok yasnippets (like me) skeletons could
still be a help.
Shelagh
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-09-29 21:33 ` Harry Putnam
@ 2009-09-30 0:15 ` Lennart Borgman
2009-09-30 6:01 ` Harry Putnam
[not found] ` <mailman.7741.1254290555.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 13+ messages in thread
From: Lennart Borgman @ 2009-09-30 0:15 UTC (permalink / raw
To: Harry Putnam; +Cc: help-gnu-emacs
There is a special mailing list for yasnippets. I think you are
missing something if you think it can't do more...
On Tue, Sep 29, 2009 at 11:33 PM, Harry Putnam <reader@newsguy.com> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> On Mon, Sep 28, 2009 at 10:30 PM, Harry Putnam <reader@newsguy.com> wrote:
>>> I wondered if anyone here is at all familiar with the different
>>> insertions related plugins for vim?
>>
>> I am not using it currently, but have you looked at yasnippet
>>
>> http://www.emacswiki.org/emacs/Yasnippet
>>
>> It would be interesting to hear how it compare. (Maybe you could add
>> something on the wiki?)
>
> I can't compare because I haven't used vims xpt but so far I guess I'm
> a little bit disappointed.
>
> The docs say you can insert whole templates but when I tried that in
> cperl mode... I find most of them aren't anything more than what cperl
> already does. There are a few on the list that do more.
>
> But for example... the for loop template inserts a kind of for loop
> that isn't near as common this kind... at least in my experience:
>
> for (@ar){
> dosomething;
> }
>
> Instead it offers:
>
> for (my $var = 0; $var < expression; $var++) {
> # body...
> }
> Which is really a different kind of usage.
>
> I realize you can make your own and edit the defaults... but then I
> can already do that with skeletons.
>
> The difference is that you can tab thru the for loop offered and fill
> it out all the way ... so that is saying something. But most of the
> offerings for perl that isn't true. Or only partly true.
>
> Somehow I guess I expected more.. like a whole starter script being
> inserted.
>
> I'm sure I can set that up in yasnippets too, but I already have a
> skeleton doing that job.
>
> Hopefully as I work with yasnippets and learn more about it... it will
> get better and better.
>
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-09-30 0:15 ` Lennart Borgman
@ 2009-09-30 6:01 ` Harry Putnam
2009-10-01 17:57 ` Andreas Röhler
[not found] ` <mailman.7741.1254290555.2239.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 13+ messages in thread
From: Harry Putnam @ 2009-09-30 6:01 UTC (permalink / raw
To: help-gnu-emacs
Lennart Borgman <lennart.borgman@gmail.com> writes:
> There is a special mailing list for yasnippets. I think you are
> missing something if you think it can't do more...
That is extremely likely.... but then too. If after say 45 minutes
browsing around the docs and I can't write at least a super simple
snippet. Then its either way out of my league or the docs aren't that
good.
I was hoping to get some rough idea of what it could do without
pounding away for a week or two... just to get started.
I have found it to be the case at least fairly often, that if I can't
get some tiny start going within something like an hour or so, then
its going to be a total pain in the butt and hefty time sync to learn
it well. Some things are worth that... like emacs and gnus, but its
hard to tell in advance.
I was able to make inserts but I tried to write a snippet after
reading that part of the docs and couldn't even make a start after
reading and tinkering for around an hour.
If the vim plugin turns out to be that way too... I'll probably toss
them both... and enlarge on my skeleton writing skills.
It seems somewhat likely because I remember seeing when I looked at it
on line that its based on textmate and so is yasnippets.
After reading some of David K's pointer to autotype and Shelagh M'd
encouraging comments and pointer to more skeleton info... It looks
like I've been seriously under utilizing skeletons.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
[not found] ` <mailman.7741.1254290555.2239.help-gnu-emacs@gnu.org>
@ 2009-09-30 18:13 ` Livin Stephen
0 siblings, 0 replies; 13+ messages in thread
From: Livin Stephen @ 2009-09-30 18:13 UTC (permalink / raw
To: help-gnu-emacs
I was hoping to get some rough idea of what it could do without
pounding away for a week or two... just to get started.
Try the video on the website then: it'll show you how to create/test a
new snippet.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-09-30 6:01 ` Harry Putnam
@ 2009-10-01 17:57 ` Andreas Röhler
2009-10-08 16:57 ` Harry Putnam
[not found] ` <mailman.8336.1255021189.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 13+ messages in thread
From: Andreas Röhler @ 2009-10-01 17:57 UTC (permalink / raw
To: Harry Putnam; +Cc: help-gnu-emacs
Harry Putnam wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>
>> There is a special mailing list for yasnippets. I think you are
>> missing something if you think it can't do more...
>>
>
> That is extremely likely.... but then too. If after say 45 minutes
> browsing around the docs and I can't write at least a super simple
> snippet. Then its either way out of my league or the docs aren't that
> good.
>
> I was hoping to get some rough idea of what it could do without
> pounding away for a week or two... just to get started.
>
> I have found it to be the case at least fairly often, that if I can't
> get some tiny start going within something like an hour or so, then
> its going to be a total pain in the butt and hefty time sync to learn
> it well. Some things are worth that... like emacs and gnus, but its
> hard to tell in advance.
>
> I was able to make inserts but I tried to write a snippet after
> reading that part of the docs and couldn't even make a start after
> reading and tinkering for around an hour.
>
Before you give up for the rest of your life:
have a look at a snippet at
yasnippet-0.6.1b/snippets/text-mode/emacs-lisp-mode
for example snippet "defun"
My bet is with your succes and delight!
Andreas
> If the vim plugin turns out to be that way too... I'll probably toss
> them both... and enlarge on my skeleton writing skills.
> It seems somewhat likely because I remember seeing when I looked at it
> on line that its based on textmate and so is yasnippets.
>
> After reading some of David K's pointer to autotype and Shelagh M'd
> encouraging comments and pointer to more skeleton info... It looks
> like I've been seriously under utilizing skeletons.
>
>
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
2009-10-01 17:57 ` Andreas Röhler
@ 2009-10-08 16:57 ` Harry Putnam
[not found] ` <mailman.8336.1255021189.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 13+ messages in thread
From: Harry Putnam @ 2009-10-08 16:57 UTC (permalink / raw
To: help-gnu-emacs
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
> Before you give up for the rest of your life:
> have a look at a snippet at
>
> yasnippet-0.6.1b/snippets/text-mode/emacs-lisp-mode
>
> for example snippet "defun"
>
> My bet is with your succes and delight!
I did take a look at that... I'm not sure exactly what I'm looking at
but somehow it doesn't appear all that delightful... can you explain
what you mean.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: the v word but not a religious salvo
[not found] ` <mailman.8336.1255021189.2239.help-gnu-emacs@gnu.org>
@ 2009-10-13 16:56 ` rustom
0 siblings, 0 replies; 13+ messages in thread
From: rustom @ 2009-10-13 16:56 UTC (permalink / raw
To: help-gnu-emacs
On Oct 8, 9:57 pm, Harry Putnam <rea...@newsguy.com> wrote:
> Andreas Röhler <andreas.roeh...@easy-emacs.de> writes:
>
> > Before you give up for the rest of your life:
> > have a look at a snippet at
>
> > yasnippet-0.6.1b/snippets/text-mode/emacs-lisp-mode
>
> > for example snippet "defun"
>
> > My bet is with your succes and delight!
>
> I did take a look at that... I'm not sure exactly what I'm looking at
> but somehow it doesn't appear all that delightful... can you explain
> what you mean.
I dont think defun is the best example
See the full demo at
http://yasnippet.googlecode.com/files/yas_demo.avi
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-10-13 16:56 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.7665.1254169850.2239.help-gnu-emacs@gnu.org>
2009-09-29 8:55 ` the v word but not a religious salvo David Kastrup
2009-09-28 20:30 Harry Putnam
2009-09-28 20:44 ` Lennart Borgman
2009-09-29 21:03 ` Harry Putnam
2009-09-29 21:33 ` Harry Putnam
2009-09-30 0:15 ` Lennart Borgman
2009-09-30 6:01 ` Harry Putnam
2009-10-01 17:57 ` Andreas Röhler
2009-10-08 16:57 ` Harry Putnam
[not found] ` <mailman.8336.1255021189.2239.help-gnu-emacs@gnu.org>
2009-10-13 16:56 ` rustom
[not found] ` <mailman.7741.1254290555.2239.help-gnu-emacs@gnu.org>
2009-09-30 18:13 ` Livin Stephen
2009-09-28 20:49 ` Matt Lundin
2009-09-29 23:04 ` Shelagh Manton
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.