Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
grndlvl CreditAttribution: grndlvl commentedComment #2
grndlvl CreditAttribution: grndlvl commentedComment #3
grndlvl CreditAttribution: grndlvl commentedOK, 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 localb: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
Comment #4
benjifisherI 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.
Comment #5
benjifisherSee 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.
Comment #6
benjifisher@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-standardsnipmate/
directory. According to this article, UltiSnips will look for SnipMate-compatible snippet definitions insnippets/
(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 ofg:UltiSnipsSnippetDirectories
) correctly.Comment #7
grndlvl CreditAttribution: grndlvl commentedNo worries, I have created my own. Thanks fo rthe concern.
Comment #8
rodrigoaguilera@grndlvl:
Maybe you can consider contributing them back so we can add them to this project.