I have supertab installed alongside with vim-go.

Next, I'd like to have autocomplete when writing in Go, but when I press tab its literally inserts a tab character instead of showing the autocomplete prompt.

I tried to add the following in my vimrc but it didn't help:

let g:SuperTabDefaultCompletionType = "context"


let g:SuperTabContextDefaultCompletionType = "<c-x><c-o>"

<c-x><c-o> works fine to start autocomplete, but I can't get anything with tab.

What am I doing wrong here?

UPD :verbose imap <Tab> result is:

i  <Tab>         <Plug>SuperTabForward
        Last set from ~/.vim/plugged/supertab/plugin/supertab.vim line 
  • I tried your first line "context" with a minimal installation. After a restart of vim fmt.<tab> showed the omni completion candidates. For debugging try to use supertab without the context feature by setting in your vimrc let g:SuperTabDefaultCompletionType = "<c-x><c-o>" (none of the one you posted). This should try only omni completion on tab. You should also add to your question the result of :imap <Tab>.
    – Hotschke
    Nov 20, 2018 at 15:46
  • @Hotschke Thanks. I have tried to add let g:SuperTabDefaultCompletionType = "<c-x><c-o>" - but still the same result - pressing the TAB button after ftm. results to adding tabulation. Also, I updated my Q with the :verbose imap <Tab> output.
    – setevoy
    Nov 20, 2018 at 16:01
  • 1
    This is weird. Do you use a minimal setup: minimal vimrc and only the two plugins in question? Could you also add $vim -version | head, terminal/gui in use, OS? Maybe there is something wrong with the keycode sent to vim.
    – Hotschke
    Nov 20, 2018 at 16:05
  • 1
    BTW there is a faq in the README.md of supertab mentioning the following: "make sure you don't have the paste option enabled in your vimrc or elsewhere."
    – Hotschke
    Nov 20, 2018 at 16:18
  • 2
    @setevoy self-answering is a part of the SE model; please post your solution as an answer if it solved your problem.
    – D. Ben Knoble
    Nov 20, 2018 at 17:53

1 Answer 1


Thanks to @Hotschke's comments.

  1. run vim without any plugins/options excepting supertab and vim-go
  2. enable options/plugins one-by-one
  3. find that the set paste option was the cause

Useful links related to this "issue":


make sure you don't have the paste option enabled in your vimrc or elsewhere

How do I debug my vimrc file?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.