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

Detailed process of implementing the 2048 mini game in WeChat applet

Rendering Example Code Today we are going to use ...

In-depth reading and practice records of conditional types in TypeScript

Table of contents Using conditional types in gene...

Implementation of CSS3 button border animation

First look at the effect: html <a href="#...

MYSQL subquery and nested query optimization example analysis

Check the top 100 highest scores in game history ...

Summary of tips for making web pages

Preface This article mainly summarizes some of th...

Getting Started with Front-End Vue Unit Testing

Table of contents 1. Why do we need unit testing?...

Detailed explanation of Linux tee command usage

The tee command is mainly used to output to stand...

Bundling non-JavaScript static resources details

Table of contents 1. Custom import in packaging t...

Introducing icons by implementing custom components based on Vue

Preface In project development, there are many wa...

VUE+Canvas implements the game of God of Wealth receiving ingots

Welcome to the previous canvas game series: 《VUE ...

Native js to achieve accordion effect

In actual web page development, accordions also a...

Linux kernel device driver advanced character device driver notes

/****************** * Advanced character device d...

Solve the problem of OpenLayers 3 loading vector map source

1. Vector Map Vector graphics use straight lines ...

How to install and modify the initial password of mysql5.7.18 under Centos7.3

This article shares with you the installation of ...

Let's talk about the characteristics and isolation levels of MySQL transactions

The Internet is already saturated with articles o...