I have used vim for C++ development for quite a while now where, for auto completion, i would either use YCM or, lately, the combination of LanguageClient-neovim and clangd. Lately, however, having been influenced by a few articles from vimways.org, i would like to explore a more ascetic auto-completion setup. Among several auto-completion flavours that vim offers, one can find "omni-completion", a context specific auto completion style with support for multiple languages. :h compl-omni-filetypes
lists C
as supported language and this is already a good start.
When looking further for omni-complete for C++, I find projects like OmniCppComplete but the last available version is quite dated: 2007. Given we get a new standard every 3 years since 2011, it feels that any C++ related tool should get a facelift every now and then.
I realize that i can always get back to the comfort of modern LSP in combination with a LSP client plugin, but what be the hard-core vim way to continue? The fewer plugins the better, right? Do vim ninjas among you say C
style omni-complete is good for 80% of the cases? Or do you toss auto complete all together, claiming it hinders your learning progress of the code base?
path
to relevant folders and combining it withfind
andwildmenu
could get you in terms of navigating through files in the project. I still would prefer myfzf
integration, but what if i am using someone elses vim setup...ctags
mostly solves the first problem (although results vary per-language) but not the second. You can solve that in VimScript, but it's often inperfect. Using an external tool asomnicomplete
solves both, but that's essentially what LSP is. For example for Go there wasgocode
which could be used like this, but for all intents and purposes it was basically just an ad-hoc LSP. I never managed to get good completion before LSP in Vim myself.