Clang Complete for Vim

后端 未结 5 927
盖世英雄少女心
盖世英雄少女心 2021-01-30 14:53

I copied clang_complete.vim to plugin, but when I typed . after some variable, it says:

pattern not found

5条回答
  •  终归单人心
    2021-01-30 15:30

    The following got things working for me on Cygwin using clang version 3.0 (tags/RELEASE_30/final), as well as on Windows using the Clang build instructions and a version checked out from trunk (usually stable, as I've read) yesterday (clang version 3.1 (trunk 154056)) and built with Visual Studio 2010:

    " clang_complete
    let g:clang_complete_auto = 0
    let g:clang_complete_copen = 1
    " :h clang_complete-auto_user_options
    if has('win32unix') " Cygwin
           " Using libclang requires a Vim built with +python
           let g:clang_use_library = 1
           " Mit der Option "gcc" kriege ich Fehler.
           " Remove "gcc" option as it causes errors.
           let g:clang_auto_user_options='path, .clang_complete'
    elseif has('win32') " Windows
           let g:clang_auto_user_options='path, .clang_complete'
           let g:clang_use_library = 1
           let g:clang_library_path='D:\Sourcen\LLVM\build\bin\Debug'
    endif
    

    Note that the Windows version may have sporadic assertion failures but works fine, although not exactly like the Cygwin version. Guess it's to do with using MSVC versus GCC header files.

    The Cygwin version has an initial error: release unlocked lock, but it works regardless.

提交回复
热议问题