The snippets are already compatiable with ultisnips. However, the drupal#BufEntr() is tied directly to snipmate.

I will be looking to see what can be done to accomodate, but hopefully others will see this and offer some insight.

Possibly relevant: https://github.com/SirVer/ultisnips/issues/280

I am thinking we may be able to adjust the UltiSnipsSnippetDirectories variable and use
silent! call UltiSnips#FileTypeChanged()

Though this is new territory for me. I haven't had to venture off further than the vimrc before so...

Thanks,

Jonathan

Comments

grndlvl’s picture

Issue summary: View changes
grndlvl’s picture

Issue summary: View changes
grndlvl’s picture

OK, so this is not as easy as I thought it would had been.

So I could def. use some direction here.

There is a path for setting the snippet directories g:UltiSnipsSnippetsDir and a local b:UltiSnipsSnippetsDir the local is used when it set, however, by the time ftplugins are called the UltiSnips bootstrap has already been called and snippets parsed. I don't see anything in the UltiSnips to reload.

Seemingly related issues:
* https://github.com/SirVer/ultisnips/issues/254
* https://github.com/SirVer/ultisnips/pull/79
* https://answers.launchpad.net/ultisnips/+question/220913

benjifisher’s picture

I do not have any experience with UltiSnips. If someone wants to convince me that it is better than SnipMate, then I might look into this. I might even switch this project from using SnipMate to UltiSnips with a 7.x-2.0 release.

benjifisher’s picture

See also #1863392: Provide compatibility for the different forks of SnipMate plugin.. That would be a good place to discuss the merits of UltiSnips vs. SnipMate.

benjifisher’s picture

@grndlvl:

Now that #1863392: Provide compatibility for the different forks of SnipMate plugin. has been committed (and renamed) the snippets are all under the snippets/ directory instead of the non-standard snipmate/ directory. According to this article, UltiSnips will look for SnipMate-compatible snippet definitions in snippets/ (but maybe not in subdirectories).

According to the UltiSnips documentation, getting this to work with UltiSnips might be as simple as defining b:UltiSnipsSnippetDirectories (the buffer-local version of g:UltiSnipsSnippetDirectories) correctly.

grndlvl’s picture

Status: Active » Closed (won't fix)

No worries, I have created my own. Thanks fo rthe concern.

rodrigoaguilera’s picture

@grndlvl:

Maybe you can consider contributing them back so we can add them to this project.