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
Can you please add support for b:SuperTabContextDefaultCompletionType or ability to set buffer-local version of that var using call SuperTabContextDefaultCompletionType()?
Here is use-case for this feature. I'm use very comprehensive omni completion for Go (http://github.com/fatih/vim-go). It detect things like variable's scope, so it's really better than simple keyword completion. Because of this I'd like to use omni-completion not only for method names, but also for usual variable/function names. But I also need fallback to keyword completion in case omni completion fail (for example, this helps a lot when writing comments/doc and wanna complete words already used in comments or names of variables which isn't in current scope, or complete language keywords like "func", "switch" which isn't supported by omni, etc.). And, of course, I don't like to lose ability to use "context" as default completion type (both because I like filename completion and because there is no sense in fallback to keyword completion when I complete method name).
Right now I see only way to implement this:
letg:SuperTabDefaultCompletionType="context"letg:SuperTabContextDefaultCompletionType="<c-x><c-u>"autocmdFileType*\ if &omnifunc!='' |
\ callSuperTabChain(&omnifunc, "<c-p>") |
\ endif
But this result in completion failure in buffers which doesn't provide &omnifunc. So, I need something like this instead:
Another idea was to provide &omnifunc in buffers which doesn't have it. I've tried to implement one as no-op, but it doesn't work as expected, not sure why.
Can you please add support for b:SuperTabContextDefaultCompletionType or ability to set buffer-local version of that var using
call SuperTabContextDefaultCompletionType()
?Here is use-case for this feature. I'm use very comprehensive omni completion for Go (http://github.com/fatih/vim-go). It detect things like variable's scope, so it's really better than simple keyword completion. Because of this I'd like to use omni-completion not only for method names, but also for usual variable/function names. But I also need fallback to keyword completion in case omni completion fail (for example, this helps a lot when writing comments/doc and wanna complete words already used in comments or names of variables which isn't in current scope, or complete language keywords like "func", "switch" which isn't supported by omni, etc.). And, of course, I don't like to lose ability to use "context" as default completion type (both because I like filename completion and because there is no sense in fallback to keyword completion when I complete method name).
Right now I see only way to implement this:
But this result in completion failure in buffers which doesn't provide
&omnifunc
. So, I need something like this instead:The text was updated successfully, but these errors were encountered: