vim Youcompleteme on 64bit Windows
文章目录
摘要:64bit vim, YCM, 64bit clang VS 2012, 64bit Widnows
vim x64 for windows
https://bitbucket.org/Haroogan/vim-for-windows
或 https://bintray.com/veegee/generic/vim_x64
vim 插件管理 Vundle 或NeoBundle
https://github.com/Shougo/neobundle.vim
MinGW 环境
https://bitbucket.org/Haroogan/vim-youcompleteme-for-windows/src
查找头文件目录,添加到.ycm_extra_conf.py
g++ -E -x c++ - -v < /dev/null
clang++ -E -x c++ - -v < /dev/null
Or in Windows Command Prompt:
g++ -E -x c++ - -v < nul
clang++ -E -x c++ - -v < nul
VS2012 环境
LLVM/CLANG x64 for windows
http://my.oschina.net/GIIoOS/blog/165542
https://sourceforge.net/projects/clangonwin/
需要 VS 2012
cmake
git for windows http://msysgit.github.io/
编译 YCM
下面主角登场了
cmake -G "Visual Studio 11 Win64" -DPATH_TO_LLVM_ROOT=d:\library\LLVM34 -DUSE_CLANG_COMPLETER=1 -DEXTERNAL_LIBCLANG_PATH=d:\library\LLVM34\lib\libclang.lib -DPYTHON_LIBRARY=D:\library\Python27\libs\python27.lib -DPYTHON_INCLUDE_DIR=D:\library\Python27\include . <USERFOLDER>\.vim\bundle\YouCompleteme\cpp
_vimrc配置
let g:ycm_key_list_select_completion = ['<C-TAB>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-S-TAB>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-Tab>'
let g:ycm_global_ycm_extra_conf = 'PATHTO\.vim\dot.ycm_extra_conf.py'
dot.ycm_extra_conf.py 配置添加
‘-I’, ‘C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include’
我们一般把“-I”用作自己的代码,"-isystem"用作第三代码。这样编译代码的时候,第三方代码编译时的warning,就不会显示出来,只需要专注在自己写的代码。
与SuperTab、UltiSnips配合
|
|
文章作者 josephpei
上次更新 2013-10-29