Search code examples
vimclang-complete

vim clang_complete "-- User defined completion (^U^N^P) Pattern not found"


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?


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.