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