congrats and a comment

0 views
Skip to first unread message

hs

unread,
Mar 13, 2008, 9:09:18 PM3/13/08
to smart-snippet
Hello folks.
I have tried this and i'm very happy. Most things that were annoying
on snippet.el and smart-snippet.el are gone.

I noticed something odd though. You have the 'for' template for cc-
mode defined like this:

for (${1:int i} = 0; ${2:i < N}; ${3:++i} )
{
$0
}

when it looks obvious to me that you should have something like this:

for (int ${1:i} = 0; ${1:i} < N; ++${1:i} )
{
$0
}

as what changes from different for instances of 'for' is very probably
the variable 'i', so you want to reflect changes on the first 'i' on
the last two...

Anyway, lots of improvement, great package, nice screencast, congrats!

-hs

Chiyuan Zhang

unread,
Mar 15, 2008, 7:01:04 AM3/15/08
to smart-...@googlegroups.com
Hi! Thanks for interesting. However, it is always hard to choose the
`default version': when I adopt the way mentioned below. Maybe some
one will complain to me that it is hard to change the increment part.
What if I want to use i+=2 instead of ++i ? :P

However, you can always modify the snippets to your taste. Here you
can find the tip to avoid your local modification being overwrite when
upgrading to a new version:
http://code.google.com/p/yasnippet/wiki/Tips

2008/3/14, hs <hug...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages