parameters: (self, trigger)
docstring: Mainly make sure that we play well with SuperTab
docstring_summary: Mainly make sure that we play well with SuperTab
docstring_tokens: Mainly make sure that we play well with SuperTab
function: def _handle_failure(self, trigger):
          """
          Mainly make sure that we play well with SuperTab
          """
          if trigger.lower() == "<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= r"\<Plug>SuperTabForward"
                      mode = "n"
                  elif idx == 1:
                      feedkey = r"\<Plug>SuperTabBackward"
                      mode = "p"
                  # Use remap mode so SuperTab mappings will be invoked.
                  break
  
          if feedkey == r"\<Plug>SuperTabForward" or feedkey == r"\<Plug>SuperTabBackward":
              _vim.command("return SuperTab(%s)" % _vim.escape(mode))
          elif feedkey:
              _vim.command("return %s" % _vim.escape(feedkey))
function_tokens: def _handle_failure ( self , trigger ) : if trigger . lower ( ) == "<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 = r"\<Plug>SuperTabForward" mode = "n" elif idx == 1 : feedkey = r"\<Plug>SuperTabBackward" mode = "p" # Use remap mode so SuperTab mappings will be invoked. break if feedkey == r"\<Plug>SuperTabForward" or feedkey == r"\<Plug>SuperTabBackward" : _vim . command ( "return SuperTab(%s)" % _vim . escape ( mode ) ) elif feedkey : _vim . command ( "return %s" % _vim . escape ( feedkey ) )