'This function is used for people who wants to have the same trigger
for expansion and forward jumping.
It first tries to expand a snippet, if this fails, it tries to
jump forward.'

@err_to_scratch_buffer.wrap
def expand_or_jump(self):

    _vim.command('let    g:ulti_expand_or_jump_res    =    1')
    rv = self._try_expand()
    if (not rv):
        _vim.command('let    g:ulti_expand_or_jump_res    =    2')
        rv = self._jump()
    if (not rv):
        _vim.command('let    g:ulti_expand_or_jump_res    =    0')
        self._handle_failure(self.expand_trigger)
