Traceback when hitting "TAB" twice after entering "def"

Bug #1239323 reported by Michel Albert on 2013-10-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Right after installing UltiSnips:

In a python file, I typed "def" then pressen TAB twice. After the first TAB, the following code has shown up:

    def function(arg1):
        """@todo: Docstring for function.

        :arg1: @todo
        :returns: @todo


The cursor was positioned on "function". Pressing TAB again, the following traceback has shown up:

    Traceback (most recent call last):
      File "/home/exhuma/.vim/bundle/ultisnips/plugin/UltiSnips/", line 23, in wrapper
        return f(self, *args, **kwds)
      File "/home/exhuma/.vim/bundle/ultisnips/plugin/UltiSnips/", line 546, in expand
      File "/home/exhuma/.vim/bundle/ultisnips/plugin/UltiSnips/", line 826, in _handle_failure
        _vim.command("return SuperTab(%s)" % _vim.escape(mode))
      File "/home/exhuma/.vim/bundle/ultisnips/plugin/UltiSnips/", line 104, in command
        return as_unicode(vim.command(as_vimencoding(s)))

Seems to be related to SuperTab?

And something else which is strange: I though ultisnips does not come with snippets by default? So why did the first "def<TAB>" work? I had "snipmate" installed before, but uninstalled (and re-started vim) prior to running into this issue.

Output of `sys.version`: 2.7.3 (default, Sep 26 2013, 20:26:19) [GCC 4.6.3]

SirVer (sirver) wrote :

Which version of ultisnips is this? Where did you clone from? The standard ultisnips comes with snippets.

Try updating your supertab. It might be that it is too old.

Changed in ultisnips:
status: New → Incomplete
Michel Albert (esz-michel) wrote :

I just upgraded both to the latest "master" branch. Now the traceback is gone, but the second "TAB" does not do anything.

SirVer (sirver) wrote :

Default jumping forward is <c-j>, not tab:

I suggest getting used to it, using tab makes a mess because ultisnip never knows when you want to jump or when you want to complete.

Michel Albert (esz-michel) wrote :

Indeed. Upgrading to the latest revision of SuperTab solved it. And I should have read the docs... I feel bad now :(
I'm sorry. And thanks for the quick reply!

I confirm that this ticket can be closed.

SirVer (sirver) wrote :

okay. Thanks for getting back.

Changed in ultisnips:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers