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

Bug #1239323 reported by Michel Albert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UltiSnips
Invalid
Undecided
Unassigned

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

        """
        pass

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/__init__.py", line 23, in wrapper
        return f(self, *args, **kwds)
      File "/home/exhuma/.vim/bundle/ultisnips/plugin/UltiSnips/__init__.py", line 546, in expand
        self._handle_failure(self.expand_trigger)
      File "/home/exhuma/.vim/bundle/ultisnips/plugin/UltiSnips/__init__.py", line 826, in _handle_failure
        _vim.command("return SuperTab(%s)" % _vim.escape(mode))
      File "/home/exhuma/.vim/bundle/ultisnips/plugin/UltiSnips/_vim.py", line 104, in command
        return as_unicode(vim.command(as_vimencoding(s)))
    vim.error

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]

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
SirVer (sirver) wrote :

Default jumping forward is <c-j>, not tab: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt#L224

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.

Revision history for this message
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.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.