ArchLinux youcompleteme VIM Auto-complete plug-in

Source: Internet
Author: User

ArchLinux the process of installing and configuring the Vim complement plug-in youcompleteme.

Reference:

Https://github.com/Valloric/YouCompleteMe

Https://github.com/gmarik/Vundle.vim

Http://www.cnblogs.com/zhongcq/p/3630047.html



1. Download Youcompleteme and syntastic with Vundle

2.pacman-s clang (compilation will get/usr/lib/libclang.so)

3. Using the Libclang library compiled from the previous step

cd ~mkdir ycm_buildcd ycm_build
 
cmake-g" Unix makefiles "-dexternal_libclang_path=/usr/lib/libclang.so . ~/.vim/bundle/youcompleteme/third_party/ycmd/cpp  
Make Ycm_support_libs

4.配置.vimrc
"" "" "" "" "" Syntastic "" "" "" "" "" "Let G:syntastic_check_on_open = 1let g:syntastic_cpp_include_dirs = ['/usr/include/'] Let g:syntastic_cpp_remove_include_errors = 1let G:syntastic_cpp_check_header = 1let G:syntastic_cpp_compiler = ' clang+ + ' Let g:syntastic_cpp_compiler_options = '-std=c++11-stdlib=libstdc++ ' "set error or warning Signslet g:syntastic_error _symbol = '? ' Let G:syntastic_warning_symbol = '? ' " Whether to show balloonslet g:syntastic_enable_balloons = 1 "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Let G:ycm_global_ycm_ extra_conf = ' ~/.vim/bundle/youcompleteme/cpp/ycm/.ycm_extra_conf.py ' "Let G:ycm_collect_identifiers_from_tags_ Files = 1set Completeopt=longest,menu"Make Vim's full menu behavior consistent with the General IDE (ref. VIMTIP1228) autocmd Insertleave * if pumvisible () = = 0|pclose|endif"Auto close preview window after leaving insert mode Inoremap <expr> <space> pumvisible ()?" \<c-y> ":" \<space> ""Press SPACEBAR to select the current item let g:ycm_cache_omnifunc=0"Disable cache matches, regenerate matches every time let G:ycm_seed_identifiers_with_syntax = 1let g:ycm_confirm_extra_conf = 0" can also be complete in the comment input g:ycm_ complete_in_comments = 1 "in string input can also complement let G:ycm_complete_in_strings = 1" comments and text in the string will also be revenue complement let G:ycm_collect_identifiers _from_comments_and_strings = 0nnoremap <leader>jd:ycmcompleter gotodefinitionelsedeclaration<cr> " Jump to Definition "," "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.