So I have a very basic C program to try and test clang_complete:
#include <stdio.h>
#include <stdlib.h>
struct xampl {
int x;
};
int main()
{
struct xampl structure;
struct xampl *ptr1;
}
However, every time I try to do structure. or ptr1->, the program gives me the error:
User defined completion (
^U^N^P) Pattern not found.
I tried adding this to my vimrc:
let g:clang_user_options='|| exit 0' --
(from this thread) but, the completion still doesn’t work.
Is there something I am missing or not understanding here?
When you say
ptr->you meanptr1->right?I have only two strings in my .vimrc
and your example works fine for me. Make sure you have .clang_complete file with valid include paths (see
:help clang_completefor example file). Try to debug clang completer by set up variablelet g:clang_debug=1. And read this thread maybe it help you.