Restrict vim auto completion to search current file only?
vim
Solution
You have to play around with the `complete` option.
From the help file,
The default is ".,w,b,u,t,i", which means to scan:
1. the current buffer
2. buffers in other windows
3. other loaded buffers
4. unloaded buffers
5. tags
6. included files
Personally, I have noted that removing included files was really helpful, so, in my .vimrc, I use:
set complete-=i
But you can remove (or add) other lists as well.
See `:help 'complete'` for more information.
Problem
`ctrl+n` and `ctrl+p` is very convenient completion for Vim, but sometimes it is very slow which may be caused that too many included header file in the current sources. Is there an option to restrict auto completion to search current source file (or opened streams) only?