Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Vim 8.2 on Ubuntu and its derivatives

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to install Vim 8.2on Ubuntu and its derivatives. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

How to install Vim 8.2 on Ubuntu and its derivatives

You can install it by executing one of the following commands based on its 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

As shown below:

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.

Install vim-airline or other plug-ins

Start the vim text editor:

[linuxidc@linux:~/www.linuxidc.com] $vim

To install vim-airline, enter:

: PlugInstall

An example of a session is as follows:

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

Clear

The PlugClean cleanup plug-in needs to be deleted or commented out in .vimrc now.

This is the end of this article on "how to install Vim 8.2on Ubuntu and its derivative version". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report