Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When calling px.snippets.advance_jumper() it leaves "=UltiSnips#JumpForwards()" in the commandline #17

Open
oiiiiiiii opened this issue Jan 31, 2025 · 0 comments

Comments

@oiiiiiiii
Copy link

As stated in the title, when calling this advance_jumper() it leaves "=UltiSnips#JumpForwards()" in the commandline. I think this is a little bit annoying, because when I have a snippet that uses this function I have this useless information at the bottom of my screen. I found a way to fix this though: Using

jump_key_binding = vim.vars["UltiSnipsJump" + direction.title()[:-1] + "Trigger"]
vim.command('call feedkeys("\\' + jump_key_binding + '")')

inside the _make_jumper_jump() method of px.snippets instead of

vim.command('call feedkeys("\<C-R>=UltiSnips#Jump' +
        direction.title() + '()\<CR>")')

does not leave it, because UltiSnips binds g:UltiSnipsJumpForwardTrigger and g:UltiSnipsJumpBackwardTrigger with the silent flag. When using just the feedkeys method, it is not silent, thus leaves this in the command line. I'm note sure if there are any complications for other use cases, but for me it works fine. Maybe there is also a better solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant