Comment 5 for bug 1171227

Revision history for this message
Jorge (skeept) wrote : Re: [Bug 1171227] Re: Add function do return a vim dictionary with current snippets

I understand your reluctancy to apply the patch, and from my point of view
if you are working actively in the 3.0 branch I might as well switch to
that branch already.
Like I mentioned I tried it before and at the time I didn't have time to do
the change because some things changed slightly, but I will find time in
the near future.

Having said that, all the patch I suggest does it define a function that
returns a dictionary with the current snippets. The pump stuff is all done
outside ultisnips.
I think it will be usefull to ultisnips to have such a function returning
the current snippets so it can be integrated with other tools. I am
thinking about neocomlcache that provides completion from different
sources, but there might be other plugins doing similar things.

But again, there migth even be a way of getting the list of current
snippets without changing the code inside ultisnips, just defining an
external function... Is this possible at this point?

On Mon, Apr 22, 2013 at 12:26 AM, SirVer <email address hidden> wrote:

> I am reluctant to apply this patch, mainly because it will likely break
> with v3.0 again - if you feel very strongly about it, please at least
> add a test for it, so there is a chance this will make it through.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1171227
>
> Title:
> Add function do return a vim dictionary with current snippets
>
> Status in UltiSnips - The Ultimate Snippet Solution for Vim:
> Incomplete
>
> Bug description:
> Hi Sirver,
>
> I wrote two small functions, one in vimL UltiSnips_SnippetDict which
> calls another function in python
> list_snippets_dict which is similar to list_snippets but just returns a
> vim dictionary with the snippets and description.
>
> The purpose of this is to be able to list the matching snippets via a
> pump instead of in the bottom of the window.
> For this the user would need to install two plugins from Ingo Karkat:
> SnippetComplete and SnippetCompleteSnipMate.
>
> I will email the author of those plugins to see if he can change one of
> them so it will support ultisnips
> (the only change will be to replace the line
>
> let l:snippets = GetSnipsInCurrentScope()
> by the line
> let l:snippets = UltiSnips_SnippetDict()
>
> so I don't antecipate a big problem there.
>
> I tried to record a short video showing the functionality:
> http://youtu.be/Cm7lzcS7SWM
>
> Please accept the patch or let me know issues you see with it.
> If you decide to accept and once I hear from Ingo I will also add
> additional information to the documentation so the users can use this
> functionality.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ultisnips/+bug/1171227/+subscriptions
>