How VIM Autocomplete Work
The beauty of a project like Vim is that it is open source. Instructions as to how you can download the source are on the Vim Download page.
If you take a look at edit.c
, you'll find a struct called compl_S
. That will be a good starting point if you want to understand how Vim's completion works.