Windows 10 Environment installation VIM code completion plugin Youcompleteme

Source: Internet
Author: User


Windows 10 Environment installation VIM code completion plugin Youcompleteme


It's been a week. Windows installation VIM code complete plug-in Youcompleteme, today at home toss a day finally fix. The key issue is the Python environment: you must ensure that the environment variable has only one python.exe in the path.



Ycmd is the Client-server architecture. The ycmd itself is a server that can be used by a variety of clients, such as Vim/youcomplete,emacs/emacs-ycmd. The service side has different engines, such as clang complement C-familiy language, other engines such as can complement the full javascript,python,c# and so on.



Because I want to use ycmd in other environment, so here the Ycmd and youcompleteme separate set. This is not quite consistent with the tutorials on the official web.


0. Reliance
    • VS Community, you must
    • Python, must. The version used here is 3.5.2
    • Git, you must
    • CMake, must
    • LLVM, optional


Download the latest version of the installation and add all the installation paths to the environment variable path. You must ensure that the environment variable has only one python.exe and its DLL in the path, otherwise the compilation will pass, but the error is run. I have been doing this for one weeks because of this, so depressed. You can run the command where Python checks, only one output is available.





1. Ycmd


Open Cmd.exe, run:


 
 
1 cd %USERPROFILE%
2 "%VS140COMNTOOLS%\vsvars32.bat"
3 git clone https://github.com/Valloric/ycmd.git ycmd.git
4 cd ycmd.git
5 python build.py --clang-completer
6 cd examples
7 pip install -r requirements.txt
8 python example_client.py


The other fifth steps compile for a long time and check for errors after compiling. The 8th step has some error output, but as long as the Python code is error-free, the service can get up.


2. VIM


On the VIM website download the latest version of the installation, and add the installation path to the environment variable path.


3. Youcompleteme


Open Cmd.exe, run:


 
 
1 cd %USERPROFILE%
2 git clone https://github.com/Valloric/YouCompleteMe.git YouCompleteMe.git
3 cd YouCompleteMe.git
4 cd third_party 
5 mv ycmd ycmd.bak
6 mklink /J ycmd ..\..\ycmd.git


According to the default settings of Youcompleteme, the Ycmd directory is in the Youcompleteme directory, so here we create a link to ycmd.git.



Open the Gvim profile _VIMRC and add a line:



Set Rtp+=%userprofile%/youcompleteme.git



Save, open a. cc file with Gvim, and if no error is prompted, the configuration succeeds. I am here to prompt Python import module requests_futures error, install with PIP:


Pip Install Requests_futures





Windows 10 Environment installation VIM code completion plugin Youcompleteme


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.