CentOS 6.5 on top of 2 days, to fail!!! As a practiced hand. On the internet to see a CentOS7.0 on the installation of Youcompleteme plug-in articles, re-installed on the virtual machine a CentOS7, according to the article executed a bit, took a day, the installation was successful.
Article Address: HTTP://WWW.TUICOOL.COM/ARTICLES/YQUEZZB
Installation:
1. Install the Vundle plug-in first, this plug-in can be seen as a 360 software steward, but this vundle plugin is to manage the Vim plug-in (perhaps also manage non-VIM plug-ins, I did not delve into). With this plugin you can manage many of the vim plugins.
$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
Note: There is no special indication that the commands here are represented in the $home directory. $ represents a general user, #表示root
If you don't have a git command, go ahead and install a git
$ vim. VIMRC
Note: If you do not have this. vimrc file, you can use the root user to view the root user's $home directory below, if there is a copy to the current ordinary user $home below, or a new copy of their own line. If not, Vim may not be installed. Although the system can input VIM command, not necessarily installed, to the following steps will also talk about this problem.
The configuration content is as follows, copy and paste in can:
SetNocompatible"Be improved, requiredFileType off"Required"set the runtime path to include Vundle and initializeSetrtp+=~/.vim/bundle/vundle/Call VUNDLE#RC ()"Alternatively, pass a path where vundle should install plugins"Let path = ' ~/some/path/here '"Call VUNDLE#RC (path)"Let Vundle manage Vundle, requiredPlugin'Gmarik/vundle'"The following is examples of different formats supported."Keep Plugin commands between here and filetype Plugin indent on."scripts on GitHub reposPlugin'tpope/vim-fugitive'Plugin'lokaltog/vim-easymotion'Plugin'Tpope/vim-rails.git'"The sparkup vim script is in a subdirectory of this repo called Vim."Pass The path to set the Runtimepath properly.Plugin'Rstacruz/sparkup', {'RTP':'vim/'}"Scripts from http://vim-scripts.org/vim/scripts.htmlPlugin'L9'Plugin'Fuzzyfinder'"scripts not on GitHubPlugin'Git://git.wincent.com/command-t.git'"git repos on your local machine (i.e. when working on your own plugin)Plugin'File:///home/gmarik/path/to/plugin'" ...filetype plugin indent on"RequiredBundle'Valloric/youcompleteme'
Save exit, then enter the VIM command, open the Vim editor, and enter the following command in VIM's command mode to install the plugin. (Plug-ins that need to be installed are configured in the. vimrc file to see if the. VIMRC configuration file is clear)
: Bundleinstall
"Note" When I installed the problem, vim unexpectedly prompted to find Bundleinstall command, that is, I entered the above installation command, the hint can not find the command, delete a few letters, press TAB, there is no automatic prompt to complete the command, sure enough, there is no Bundleinstall command. I guess will be bundle is also a plug-in, also did not install, according to this idea searched for a morning article, also did not find a solution. Later accidentally saw an article said that the implementation of VI and must be open VI, there may be open vim, I guess my centos7 are not installed vim. The result I use the Software Installation Wizard of virtual machine to search vim, sure enough vim can be installed state, that means that my system is not installed, or the version is low (I am not sure), anyway is installed vim, Bundleinstall command can be used.
There was an error during installation, which is normal because ycm needs to compile the library files manually.
done! with errors; Press L to view log
Ycm_client_support. [So|pyd|dll] and Ycm_core. [So|pyd|dll] not detected; You need to compile YCM before using it. Read the docs!
In addition, if some plug-in installation failed, then forget, comment out, the main guarantee Youcompleteme plug-in can be installed.
Configuration youcompleteme:
Then execute the command under. Vim/bundle/youcompleteme
$./install.sh--clang-complete
parameter is to support the completion of C/
Note: An error may occur after the command is executed. I install the time is error, first reported a mistake, I read the error message, probably means that there is no cmake command. On-line search, installed CMake, solved.
Then there may be an error:
Some folders in/home/sky-tm/.vim/bundle/youcompleteme/third_party/ycmd/third_party is empty; Probably forgot to run:git submodule update--init--recursive
If this error occurs, follow the prompts to continue entering the command:
$git submodule Update--init–recursive
After this command update is complete, this command is executed:
$./install.sh--clang-complete
Youcompleteme you need to find a ycm_global_ycm_extra_conf file when you complete the completion. You can place this file in the working directory each time, or you can set the global. Global settings to be in the. Add a line to the VIM RC.
Let g:ycm_global_ycm_extra_conf = ' ~/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py '
Note:. ycm_extra_conf.py is a hidden file, path in ~/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py
I ended up just copying a copy of the. ycm_extra_conf.py into my $home directory, and then configuring it, adding some paths to the standard header files of C + +. Still do not understand the meaning of the configuration file.
In addition, I would like to configure, let this only provide c,c++ related tips, not other language hints, what should be done?
Other than that The. VIMRC configuration in this article is not final, so far, I tried, the effect is not very good, perhaps I have not played its maximum power, but the personal feeling really not well, and on the Internet to find a configuration, a copy of the. vimrc file, and then modified some formatting errors (the Chinese punctuation in the code caused the error) , and then try a bit, the effect can be, incredibly press F5 can be compiled to execute, a sense of vs. Note that after you have replaced the. vimrc file, you still have to perform bundleinstall because the second copy of the. VIMRC configuration file adds some plugins that need to be bundleinstall.
Linux CentOS 7 youcompleteme related configuration.