I copied clang_complete.vim
to plugin, but when I typed .
after some variable, it says:
pattern not found
Try opening a sample file
vim /tmp/sample.cpp
and enter some cpp code
#include
int main() {
std:: // <-- this should complete
}
Note that you actually need to include the headers, since completion is done with the compiler. If this works, but your project still keeps saying "Pattern not found" then clang++ is probably not able to compile your project. Do you use any -I
switches when you compile your code? Add them to a file named .clang_complete
in your project directory.
For me this works fine with my .vim/plugin
folder containing only the clang_complete.vim
file that is available for download:
$ find .vim
.vim
.vim/plugin
.vim/plugin/clang_complete.vim
... but in this issue report https://github.com/Rip-Rip/clang_complete/issues/39 it is suggested that you might need more than that file (additional files are in the git repo).