Introduction to vim plugin installation under Linux system

Introduction to vim plugin installation under Linux system

Install vim plugin manager

It is recommended to install the plugin manager when using the plugin for the first time, which can simplify the steps of installing the plugin.

1. Download the plug.vim file and place it in the following autoload directory depending on the operating system:
Linux: ~/.vim/autoload
Windows: ~\vimfiles\autoload\plug.vim

plug.vim address: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

insert image description here

2. The directory structure is as follows. The installed plug-ins will be stored in the plugged directory:

If there is no ~/.vim/autoload directory, create it using mkdir -p ~/.vim/autoload .

insert image description here

3. Add the plug-vim section to the ~/.vimrc file

Just write the plug-in you need between call plug#begin('~/.vim/plugged') and call plug#end()

call plug#begin('~/.vim/plugged')
"Use Plug "github user/project name" here to introduce the plug-in"
" Rainbow bracket Plug 'luochen1990/rainbow'
"
" History Plug 'mhinz/vim-startify'
"
call plug#end()

Plug 'luochen1990/rainbow'' indicates the plug-in we want to install, which is a plug-in that automatically colors code brackets.

4. Execute commands in vim. Install the plugin

Install plug-in :PlugInstall starts the plug-in installation.

You can use the following command to specify the installation of a specific plug-in :PlugInstall gist-vim

Uninstall plugin :PlugClean

First comment or delete the configuration information of the corresponding plug-in in the vimrc configuration file, and then execute the command

Update the vim-plug plugin itself :PlugUpgrade

Batch update all installed plug-ins :PlugUpdate

Plug-in status :PlugStatus

Use this command to view the status information of the currently installed plug-ins.

Add plugin demo

The following demonstrates how to add a plugin.

First, make sure that there is a plug.vim file in ~/.vim/autoload

insert image description here

Then open ~/.vimrc and add the required plugin name. Enter PlugInstall in command mode

insert image description here

insert image description here

The installation has been successful. Now open vim to see the effect.

1. History file plug-in. Type vim

Enter the corresponding number, or move the cursor to the corresponding entry and press <Enter> to open the file again.

insert image description here

1. Rainbow Brackets Plugin

Matching pairs of brackets display the same color.

insert image description here

I personally feel that rainbow brackets are very useful. The corresponding brackets can be clearly identified.

insert image description here

To remove a plugin :

insert image description here
insert image description here

This is the end of this article about the installation of vim plug-in under Linux system. For more relevant linux vim plug-in installation content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Linux Vim Practical Commands Explained
  • How to operate vi and vim editors in Linux
  • Detailed explanation of Linux text editor Vim

<<:  Special effects of Bootstrap 3.0 study notes (display and hide, eliminate floating, close button, etc.)

>>:  A brief analysis of JS original value and reference value issues

Recommend

Introduction to the properties of B-Tree

B-tree is a common data structure. Along with him...

MySQL GROUP_CONCAT limitation solution

effect: The GROUP_CONCAT function can concatenate...

Linux C log output code template sample code

Preface This article mainly introduces the releva...

Summary of CSS front-end knowledge points (must read)

1. The concept of css: (Cascading Style Sheet) Ad...

Vue basic instructions example graphic explanation

Table of contents 1. v-on directive 1. Basic usag...

Detailed explanation of Vue's SSR server-side rendering example

Why use Server-Side Rendering (SSR) Better SEO, s...

Import backup between mysql database and oracle database

Import the data exported from the Oracle database...

Docker-compose creates a bridge, adds a subnet, and deletes a network card

1. Create a docker network card [root@i ~]# brctl...

vsCode generates vue templates with one click

1. Use the shortcut Ctrl + Shift + P to call out ...

How to configure Http, Https, WS, and WSS in Nginx

Written in front In today's Internet field, N...

Linux kernel device driver system call notes

/**************************** * System call******...

Press Enter to automatically submit the form. Unexpected discovery

Copy code The code is as follows: <!DOCTYPE ht...

Solution to 700% CPU usage of Linux process that cannot be killed

Table of contents 1. Problem Discovery 2. View de...