supertab icon indicating copy to clipboard operation
supertab copied to clipboard

supertab doesn't work with vimwiki

Open hrrybrwn opened this issue 9 years ago • 7 comments

Hi guys,

I'm using SuperTab regularly to autocomplete english words.

Supertab does work in any regular file.

But when I use SuperTab in a file.wiki file, which is filename for vimwiki plugin, Supertab doesn't work anymore. For example, when try to tab the word "acknow", I get a tab instead of a list of possible completions.

I'm not a expierienced vim user yet, so I don't have the knowledge to solve this on my one.

Here is a link to my .vimrc http://pastebin.com/EFu4K9w1

hrrybrwn avatar Apr 10 '15 23:04 hrrybrwn

When you attempt to complete "acknow", are you typing a<tab> or just <tab> with now letter in front of the cursor? By default, supertab will only complete words if there is a character in front of the cursor, otherwise it will insert a litteral tab.

If you are attempting to complete with a leading character, check to make sure that supertab is enabled properly for that file and that some other plugin didn't override the supertab mapping (run the following while editing one or your vimwiki files):

:verbose imap <tab> 

ervandew avatar Jun 12 '15 14:06 ervandew

Same issue here. I get these two results from :verbose imap <tab>

i <Tab> *@vimwiki#tbl#kbd_tab() Last set from ~.vim\b\Wi\ftplugin\vimwiki.vim i <Tab> <Plug>SuperTabForward Last set from ~.vim\b\T\plugin\supertab.vim

rbadapanda avatar Nov 02 '16 23:11 rbadapanda

I know this is old, but I thought I'd post the solution, seemingly posted by the same user on reddit; see this link

In short, this can be fixed by putting the following in your .vimrc (or equivalent)

" disable the <tab> mapping provided by vimwiki, which interferes with SuperTab
let g:vimwiki_table_mappings = 0

Clearly, this disables the functionality provided by VimWiki (related to table editing) though.

advocateddrummer avatar Mar 22 '17 14:03 advocateddrummer

@advocateddrummer Thanks. I can probably live with that.

sjfloat avatar Jan 14 '18 21:01 sjfloat

Actually, this doesn't seem to be helping with the problem. Perhaps it did at the time, but no more.

sjfloat avatar Sep 26 '21 22:09 sjfloat

In case anyone else runs into this issue again, the command has changed with a recent update:

" necessary for tab completion to work 
let g:vimwiki_key_mappings = { 'table_mappings': 0, } 

gboehl avatar Jan 14 '23 07:01 gboehl

Thank you, @gboehl, that worked! I had an issue with copilot completions which has now been resolved.

antonpetrovmain avatar Mar 23 '23 16:03 antonpetrovmain