snipmate vs UltiSnips?

2,746 views
Skip to first unread message

Marc Weber

unread,
Dec 8, 2012, 6:20:27 AM12/8/12
to vim...@googlegroups.com
Luckily the question is partially gone, because I've done some work on
making UltiSnips read snipmate files close to the way UltiSnips did.

You can find all details here, "3) ultisnip"
https://github.com/honza/snipmate-snippets

This is a preview and unfinished, but does already work for me.

The goals are:
- join both communities
- get best of both worlds
- the snipmate engine was/is broken in some minor ways. [1]
I don't have the time to rewrite it.
- ...

drawbacks:
- UltiSnips depends on python, but that's fine today. Everybody can
install it.
- the <tab> completion list menu does not work in UltiSnips yet, but
list all snippets feature works well enough to not make me work on
it right now.

benefits:
UltiSnip's engine may be less broken. I hit some cases where snipmate
didn't do what I expected such as expand for, entering 234 and the var
name was not replaced to j everywhere. I also supports nested snippets
and has better support for running arbitrary shell code.
It also can do advanced stuff like centering a headline (bbox)
(but that feature is currently broken in my branch because I broke the
!p feature - will fix ASAP)

[1] You can't quote ${1} properly. Some placeholders work with alpha but
not with numeric typnig (for, placeholder length).

There are still some differences. So its a "release early and often"
announcment for getting some feedback.

if you find any additional bugs about reading snippets file them against
my github repository.

For completness there is also the engine xptemplate - but its snippet
syntax is very different which is why I did'nt consider it as mergeable
right now.

Happy snipping.
Marc Weber

Marc Weber

unread,
Jan 20, 2013, 9:58:10 PM1/20/13
to vim_use
> You can find all details here, "3) ultisnip"
> https://github.com/honza/snipmate-snippets

The branch now supporst completion menu as snipmate does.
Thus I highly recommend giving that branch a try now.

There are not much reasons left to keep using snipmate (unless you don't
have python)

Marc Weber

av

unread,
Jan 21, 2013, 7:30:41 AM1/21/13
to vim_use
Try simpleSnip.

Marc Weber

unread,
Jan 21, 2013, 11:39:24 AM1/21/13
to vim_use
Excerpts from av's message of Mon Jan 21 13:30:41 +0100 2013:
> Try simpleSnip.
Tell us why the UltiSnip and snipmate community should do it.
Then we all have a nice overview about the available options.

I'll tell you why you should consider joining snipmate/ UltiSnip community:

- UltiSnips is well tested

- snipmate-snippets is a comprehensive list of snippets which can now be
used with both: snipmate and UltiSnips

- both snipmate and UltiSnips reload snippet files automatically based
on timestamp. No need to remember any "reload" command
Thus writing a new snippet will be available in all vim instances.

- both support loading plugins from many files from runtimepath.
In both cases you can override this behaviour easily

- both projects have a comprehensive documentation.

Your first release was 2012-11-17.
UltiSnips dates back 2009. snipmate is also older.

If you want to serve the community document why you had to start from
scratch - so that its easier to judge which tool to use for what reason.
Vim is not about reinventing the wheel (IMHO).

But thanks for reminding me that I still have to port the autoindent
feature to UltiSnips :)

This mail only reflects my view. Its fine if other people think
differently.

Short note about "load snippets from other filetype":
I think you should map :set ft= or such, because then you also get
indentation and more support for the filetype you care about at that
moment. Its a more universal solution.

Yours
Marc Weber
Reply all
Reply to author
Forward
0 new messages