Using VIM for C++/Qt development w/ Autocomplete
Take a look at this: http://vim.wikia.com/wiki/VimTip1608
A pain to configure, but after all you'll get VS-like autocompletion + all the tasty omnicompletion stuff like Ctrl-P
to complete the word, Ctrl-X-Ctrl-L
to complete the line etc.
You might want to take a look at OmniCpp.
It's a set of Vim-scripts that enables auto-completion based on c-tags.
It is not exactly straightforward to set up but works pretty well afterwards. Basically you have to generate the c-tags for the include files you use. Then the plugin integrates into Vim to complete what you type, depending on the variables type.
I don't think I have any magic settings in my vimrc which enables this, but I can just start typing and then (while still being in insert mode) press Ctrl+N
to have vim suggest completions. It seems to check the open buffers for possible completions. It's not perfect, but in 98% of the cases it does what I want and there's no setup work needed.