vim installation (github download vim)
1. Download https://github.com/vim/vim2. Upload to the Linux path (I use 10.238.14.142:/home/infa here)
3. Unzip: unzip vim-master.zip
4. Enter the directory: /home /infa/vim-master
5. Configure, compile and install (requires root authority, and you have the corresponding authority)
./configure --prefix=/usr/local/vim && make && make install
6. Check vim version
7, Modify the default vim, modify the original vim7.0 version to vim7, add a soft link to set the new vim8.0 as the default vim
which vim
cd /usr/bin/
mv vim vim7
ln -s /usr/local/vim/bin/ vim vim
remarks:
The installation of source code under Linux generally consists of 3 steps: configure (configure), compile (make), and install (make install). The specific installation method is usually given by the author. . Configure is an executable script with many options. Use the command ./configure –help to output a detailed list of options, as follows:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
…….(A few omitted)
Another benefit of using the --prefix option is to uninstall or port software. When a certain installed software is no longer needed, simply delete the installation directory, and the software can be uninstalled cleanly; to migrate software, just copy the entire directory to another machine (same operating system).
A small option has such a convenient role, it is recommended to use it in actual work