Reputation: 27875
When working with filetypes other than c
I only get suggestion from all open buffers (using supertab). But when I hit Tab to do word completion in c filetypes I get suggestions from system wide C header files which are useless to me (specially when number of suggestions are more to navigate).
I don't think any of my plugins are interfering in this. I don't want suggestions from header files. Please, what can I do?
Upvotes: 0
Views: 74
Reputation: 76276
There are some default plugins interfering. The option 'complete'
selects which completion sources you are interested in. The possible ones are:
'dictionary'
optionspell
)'copmplete'
option with behaviour similar to 'dictionary'
and 'thesaurus'
The default setting is:
The last or the next-to-last item is interfering with your usage. The included files are searched based on options
'include'
defines patter for finding include directives. The default value is appropriate for C files, so this completion mode kicks in in C (and C++) files and not much anywhere else.'path'
defines where the include files are searched. Check whether you have /usr/include
there.'tags'
defines list of "tags" files to use by relative or absolute paths. You might have /usr/include/tags
there.You can disable these completions by either removing respective flags from 'complete'
option or by removing /usr/include
from 'path'
and/or /usr/include/tags
from 'tags'
. The completion modes are default, but the paths shouldn't be (/usr/include/tags
is a vi default, but not vim default, so it shouldn't be used if you've set 'nocompatible'
).
Note, that tags will always complete from all system files, since it uses an index of symbols, while include will only complete from actually (even indirectly) included files.
Upvotes: 2