liveoreo.blogg.se

Vim supertab context omni
Vim supertab context omni




if the text preceding the cursor doesn't look like an object member access, etc, then run whatever is set by g:SuperTabContextDefaultCompletionType.then run user/omni completion (which ever you've configured supertab to use in this case) Close vim's completion preview window when code completion is finished.

Prevent from completing after/before defined patterns.

Configurable to suit your needs: Default completion type to use.

• if the text preceding the cursor looks like you are attempting to complete an object member, etc. Supertab is a vim plugin which allows you to use for all your insert completion needs (:help ins-completion).

To use it, you start typing something, and then hit ctrl-x ctrl-o to show possible completions. This means that jedi-vim is only used when performing omni-completion. That plugin uses the default omnicompletion which Vim 7 supports out of the box. What jedi-vim does is set omnifunc option to use the function it provides. I installed this plugin with nicer php omni-completion. That setting is unrelated to completion chaining. I found some helpful general info about Omni completion. Once supertab has sent those keys, it's entirely up to the completion implementation (user, omni, keyword, etc) to decide what those completions are.Īlso, if I might have a humble suggestion, it's not entirely clear to me why g:SuperTabContextDefaultCompletionType exists when it has no effect without chaining and you actually have to provide second function in a chain anyway - maybe it could be explained slightly clearer in the doc? All these various supertab configuration settings and hooks are just there to tune supertab's decisions on what the proper key sequence to send to vim is. All that supertab really does is attempt to send the proper key sequence to vim. This should try only omni completion on tab.

For debugging try to use supertab without the context feature by setting in your vimrc let g:SuperTabDefaultCompletionType '' (none of the one you posted). After a restart of vim fmt. showed the omni completion candidates.

You should be able to reproduce the same result using a.d and then a.d. I tried your first line 'context' with a minimal installation.

vim supertab context omni

It would be great if you could share your thoughts on this - is it a behavior specific to supertab? Going back to my example (and this is last question, I promise) when I hit tab after typing a.d I get - User defined completion (^U^N^P) match 1 of 2 and some random completion from C++ ctags, def() not among them, but when I type a.de and hit tab I get - Keyword Local completion (^N^P) Back at original which actually gives a.def. I'd swear that I've tried it to no avail.






Vim supertab context omni