Question

I'm new to vim and I'm trying to get code completion to work. I'm using clang_complete and vim-cmake-project. I open my project by typing :CMake projectdirectory It opens my project and I can select which file I want to open but when I try to trigger clang_complete it says, -- User defined completion (^U^N^P) Pattern not found. I added this to my .vimrc file:

let g:clang_complete_auto = 1
let g:clang_use_library = 1
let g:clang_debug = 1
let g:clang_library_path = '/usr/lib/'
let g:clang_user_options='|| exit 0'

However, I still get the same error. Also I have clang and libclang-dev packages installed. So what else can I do to get clang_complete to work?

Was it helpful?

Solution

Pressing ctrl+X will force it to complete which appears to work fine. Still not sure why it happens. I suspect you have to create a .clang_complete file but I never could get the python script to work.

OTHER TIPS

My configure as follow: 1) .vimrc add: let g:clang_user_options='|| exit 0'

2) add .clang_complete code browser directory eg. -I../mylib/include

When appear "-- User defined completion (^U^N^P) Pattern not found", I find that i miss add some include dirs to .clang_complete.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top