Skip to content

How can I use <Tab> for accept, but use Tab as default for indent if not have autocomplete #277

Closed Answered by Saghen
letieu asked this question in Q&A
Discussion options

You must be logged in to vote
['<Tab>'] = {
  function(cmp)
    if cmp.snippet_active() then
      return cmp.accept()
    else
      return cmp.select_and_accept()
    end
  end,
  'snippet_forward',
  'fallback',
}

That's the default in the super-tab keymap preset

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by letieu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants