How to install the latest Vim8.2 and Vim plug-in Manager
Today, I will talk to you about how to install the latest Vim8.2 and Vim plug-in manager, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
My personal favorite is vim-plug, which is a beautiful and minimalist plug-in for vim. Let's take a look at how to install and use this plug-in on Linux or Unix-like systems.
Users who are interested in installing this new version can do so by executing one of the following commands according to their system.
Ubuntu and its derivative version
[linuxidc@linux:~/www.linuxidc.com] $sudo add-apt-repository ppa:jonathonf/vim
[linuxidc@linux:~/www.linuxidc.com] $sudo apt-get update [linuxidc@linux:~/www.linuxidc.com] $sudo apt install vim
Arch Linux and its derivative version
[linuxidc@linux:~/www.linuxidc.com] $sudo pacman-S vim [linuxidc@linux:~/www.linuxidc.com] $flatpak install flathub org.vim.Vim
For anyone who likes Vim, the vim plug-in manager is a must. You can find some options available in. My personal favorite is vim-plug, which is a beautiful and minimalist plug-in for vim. Let's take a look at how to install and use this plug-in on Linux or Unix-like systems.
How to install vim-plug
Naturally, you must install vim on your system. For demonstration purposes, I use Ubuntu Linux. Download plug.vim and place it in the "autoload" directory:
[linuxidc@linux:~/www.linuxidc.com] $mkdir-p ~ / .vim/autoload/ [linuxidc@linux:~/www.linuxidc.com] $cd ~ / .vim/autoload/
Now let's use the wget or curl command to get the plugin.vim as follows:
[linuxidc@linux:~/.vim/autoload] $wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim or [linuxidc@linux:~/.vim/autoload] $curl-O https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
How do I configure vim's plug-in manager vim-plug for Linux or Unix?
The syntax in ~ / .vimrc is as follows:
Specify the plug-in directory
Call plug#begin ('~ / .vim / plugged')
The plug-in allows you to use any valid git URL
Plug 'valid git URL'
Abbreviated symbols for plug-ins
Plug 'linuxidc/linux'
Initialize the plug-in system
Call plug#end ()
Example:
Suppose you want to use a bottom state enhancement / beautification vim plug-in called vim-airline. You need to add the following to the ~ / .vimrc file:
Call plug#begin ('~ / .vim / plugged') Plugin 'vim-airline/vim-airline' call plug#end ()
Save and close the file.
Start the vim text editor:
[linuxidc@linux:~/www.linuxidc.com] $vim
To install vim-airline, enter:
: PlugInstall
Use the following command to check the status:
: PlugStatus
To update the plug-in, enter:
: PlugUpdate
To upgrade the vim-plug itself, type the following in the vim session:
: PlugUpgrade
To clean up the plug-in, you need to delete or comment it out in .vimrc.
Of course, if you like vundle or pathogen, you don't need to switch. But I like this one better.
After reading the above, do you have any further understanding of how to install the latest Vim8.2 and Vim plug-in manager? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.