You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't manage to setup both omni and keyword completion. From my understanding the completion should use the DefaultCompletionType and if that returns no results it should then use ContextDefaultCompletionType.
What I want to achieve is to use Omni first and if that returns no results use standard keyword completion. However I can't get it working. My setup is:
When editing a php file, the omni is used as expected and a list of, say, variables is proposed exactly the same as when manually invoking <c-x><c-o>. But when writing a comment keyword completion is not invoked as it does when manually using <c-x><c-n>. The same thing happens in html, ie. tags are completed by omni but text is not completed by keyword.
When I switch g:SuperTabContextDefaultCompletionType to '<c-n>' the effect is opposite. In php only keyword completion is triggered, ie. pushing TAB after $ shows keywords not variables and I need to manually use <c-x><c-o>. In html it's the same and even worse because the built-in omni closing of html tags doesn't work, ie. pushing TAB after </ triggers filename completion instead of omni.
I guess, I don't quite understand the config options. How this should be set up to work as I described?
The text was updated successfully, but these errors were encountered:
What I want to achieve is to use Omni first and if that returns no results use standard keyword completion.
Supertab refers to this as 'completion chaining' and you have to enable this on a per buffer basis with a call to SuperTabChain as described in the supertab help (:help supertab-completionchaining).
So in your case, you'll need to first remove these two settings from your config:
Remove these
let g:SuperTabContextDefaultCompletionType = '<c-o>'
let g:SuperTabContextTextOmniPrecedence = ['&omnifunc', '&completefunc']
Then you can either setup supertab's completion chaining globally like so:
I can't manage to setup both omni and keyword completion. From my understanding the completion should use the
DefaultCompletionType
and if that returns no results it should then useContextDefaultCompletionType
.What I want to achieve is to use Omni first and if that returns no results use standard keyword completion. However I can't get it working. My setup is:
When editing a php file, the omni is used as expected and a list of, say, variables is proposed exactly the same as when manually invoking
<c-x><c-o>
. But when writing a comment keyword completion is not invoked as it does when manually using<c-x><c-n>
. The same thing happens in html, ie. tags are completed by omni but text is not completed by keyword.When I switch
g:SuperTabContextDefaultCompletionType
to'<c-n>'
the effect is opposite. In php only keyword completion is triggered, ie. pushingTAB
after$
shows keywords not variables and I need to manually use<c-x><c-o>
. In html it's the same and even worse because the built-in omni closing of html tags doesn't work, ie. pushingTAB
after</
triggers filename completion instead of omni.I guess, I don't quite understand the config options. How this should be set up to work as I described?
The text was updated successfully, but these errors were encountered: