Original link: https://ssshooter.com/2020-01
The whole process is not difficult, but I am very strange to Linux system. I am a bit confused when compiling and installing. But after the installation, I think it’s not difficult if I don’t go deep into the principle. It’s very common to compile the configured source code with a compiler, and then run the program. In fact, I don’t need to do anything difficult.
VIM 8 installation
As a matter of fact, users of CentOS 7.5 who eat shrivels don’t directly install VIM 8. Although Baidu can go to a solution of changing warehouse and then yum, unfortunately, that warehouse has already 404.
Therefore, we can only use the source code honestly
First, pull the official warehouse of vim: https://github.com/vim/vim
Cut in: there’s a very hot place here. Tencent cloud clone GitHub warehouse is so fast. I have to pull the GitHub warehouse once in gitee, and then clone gitee is the solution to save the nation Warehouse, but this is not omnipotent, because in some cases, you can’t pull other library codes in one library, which is more troublesome.
Suppose that the warehouse has been pulled and entered the SRC folder of the warehouse:
Then configure the installation,You can’t use youcompleteme without this(my broken machine is py2.7, and I don’t want to toss and update, so I just use 2.7.)
If there is no configuration, a prompt like this will pop up,
YouCompleteMe unavailable: requires Vim compiled with Python ...Don’t ask me how I know
./configure --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config
It should be noted that the address of Python config dir is not correct.You may need to install the compiler after configuration
yum install gcc-c++(the solution found by the search engine may include other things. If not, install it again). Then run:
make && make install
After the compilation is successful, the
vimYou can open the latest version of vim. If you feel inconvenient, you can
$PATH Add environment variables。
Then install the plug-in manager (vimplug, etc.) and edit the configuration file vimrc. It’s not very difficult, so we won’t expand it here.
Here use vimplug as an example to install youcompleteme.
The first step is the same as ordinary plug-ins:
Run pluginstall in VIM after configuration.
Step two, because of thisPlug ins also need to be compiled to use, so we need to install another
The third step is to open the folder of your complete me (if vimplug is used, it should be in the
Add in: install needs to pull several dependent projects first. These projects are naturally stored in GitHub. It is also said that Tencent cloud pull GitHub warehouse is really slow, so this step has been a long time.
At this point, you can use it normally, but you can still optimize the plug-in to your most convenient appearance through configuration.
Finally, I recommend a place to find plug-ins: vimawesome