Use a completion dialog for multiple matches
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
This started in bug #714119, the ideas are summarized here.
The idea is to use the standard vim completion window when more than one completion matches the typed text. This seems like a much cleaner way of handling this case, rather than using the menu UltiSnips uses now.
You can force a completion menu using the complete() function. I don't think you can find out exactly which thing the user picks though. I was thinking that maybe we could trigger the completion window, and if it matched multiple snippets with the same trigger, then we could append a number (or similar) to the end to make them unique. We can add the number to the "word" part of the completion-item and not the "abbr" part which is shown in the menu (see complete-items). If we did this, then we would need to temporarily add the new triggers to the snippet as well.
For the regular expressions, we may be able to temporarily do something to make them unique, then if it's picked, put the original text back in and force that snippet to expand so that the match information is generated properly
Changed in ultisnips: | |
importance: | Low → Wishlist |
This is a non trivial change to UltiSnips but one I wholeheartedly agree with.