SirVer / ultisnips

UltiSnips - The ultimate snippet solution for Vim. Send pull requests to SirVer/ultisnips!
GNU General Public License v3.0
7.49k stars 687 forks source link

Check if jumpable #1105

Open eichboson opened 4 years ago

eichboson commented 4 years ago

This is not an issue, but a feature request. I have tried to somehow get a simple function to return true or false whether a jump is present or not, but I couldn't get a reliable solution, that worked in every situation. Would it be possible to implement a function "isJumpable" to do just that?

coc-snippets for example provides coc#jumpable() but I don't want to use coc-snippets with ultisnips as it doesnt support python t s m variables

SirVer commented 4 years ago

Yes, this would be feasible. It needs refactoring in https://github.com/SirVer/ultisnips/blob/8ff301c651d6df806c0f9305273a6c62a693bc48/pythonx/UltiSnips/snippet_manager.py#L497 to implement such a functionality.

mvcouwen commented 4 years ago

Would this not be the same as checking whether there is an active snippet? For example, by checking len(self._active_snippets)?

thorlucas commented 3 years ago

This would be a great feature