'Mainly make sure that we play well with SuperTab.'

def _handle_failure(self, trigger):

    if (trigger.lower() == '<tab>'):
        feedkey = ('\\' + trigger)
    elif (trigger.lower() == '<s-tab>'):
        feedkey = ('\\' + trigger)
    else:
        feedkey = None
    mode = 'n'
    if (not self._supertab_keys):
        if (_vim.eval("exists('g:SuperTabMappingForward')") != '0'):
            self._supertab_keys = (_vim.eval('g:SuperTabMappingForward'), _vim.eval('g:SuperTabMappingBackward'))
        else:
            self._supertab_keys = ['', '']
    for (idx, sttrig) in enumerate(self._supertab_keys):
        if (trigger.lower() == sttrig.lower()):
            if (idx == 0):
                feedkey = '\\<Plug>SuperTabForward'
                mode = 'n'
            elif (idx == 1):
                feedkey = '\\<Plug>SuperTabBackward'
                mode = 'p'
            break
    if ((feedkey == '\\<Plug>SuperTabForward') or (feedkey == '\\<Plug>SuperTabBackward')):
        _vim.command(('return    SuperTab(%s)' % _vim.escape(mode)))
    elif feedkey:
        _vim.command(('return    %s' % _vim.escape(feedkey)))
