help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the v word but not a religious salvo


From: Harry Putnam
Subject: Re: the v word but not a religious salvo
Date: Tue, 29 Sep 2009 16:33:42 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]