Skip to content

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

Description

@oiiiiiiii

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions