Recommendation applies to Vim plugin for programmers and developers

Before the introduction of the most common and popular Vim plugin, let us first understand the true meaning of Vim. Basically, Vim is just another text editor, we can use it to write and edit text, as commonly used on Windows or Mac Sublime Text, and even use Notepad on Windows the same. Vim allows efficient text editing, and sometimes it can even be considered complete IDE programmers. Edit existing code as a software engineer is very time-consuming and monotonous. Because Vim and efficiency, and therefore it allows us to use the existing shortcuts to handle repetitive tasks, and even customize and create your own keyboard.

Recommendation applies to Vim plugin for programmers and developers

Popular Vim plugin

Vim is one of the oldest text editor, but it is still very strong. Mature, stable and scalable, with a large number of plug-ins can be accessed across the network. Vim plugin does is to extend Vim's help function by using it to enhance our workflow.

Vim plug substantially large VimScript recorded in a particular distributed directory structure. Vim plugin in the Plugin Manager as a tarball is distributed as a package before the famous. Vim plugin incorporates other features in Vim - these are not inherent features editor. Due to the presence of Vim, can be achieved wide range of applications using a variety of plug-ins. To be honest, Vim plugin perhaps the most fundamental purpose.

1、Vim Rainbow

Recommendation applies to Vim plugin for programmers and developers

Almost all major programming languages ​​are the square brackets to achieve different intents and purposes - in square brackets, parentheses and braces. Typically, they will use nested pairs of brackets, it is difficult to figure out a bracketed opening and closing zone. I found myself often number in parentheses, especially in complex Bash script to ensure correct.

Well now, Vim Rainbow plug-in to, because it each pair of brackets set a different color, making it very easy to do a parenthesis which is a pair of parentheses. Also very useful and very vivid.

Advanced Configuration

Advanced Configuration allows you to define what brackets for each type of file. You can also determine the color of the brackets by this method.

For example, following a high-level configuration (add these statements to your .vimrc in):

let g:rainbow_active = 1

let g:rainbow_load_separately = [
    \ [ '*' , [['(', ')'], ['\[', '\]'], ['{', '}']] ],
    \ [ '*.tex' , [['(', ')'], ['\[', '\]']] ],
    \ [ '*.cpp' , [['(', ')'], ['\[', '\]'], ['{', '}']] ],
    \ [ '*.{html,htm}' , [['(', ')'], ['\[', '\]'], ['{', '}'], ['<\a[^>]*>', '</[^>]*>']] ],
    \ ]

let g:rainbow_guifgs = ['RoyalBlue3', 'DarkOrange3', 'DarkOrchid3', 'FireBrick']
let g:rainbow_ctermfgs = ['lightblue', 'lightgreen', 'yellow', 'red', 'magenta']

Get Vim Rainbow

2、Nerd-tree

Recommendation applies to Vim plugin for programmers and developers

One of the popular Vim plugin widely used Nerd-tree. NERDTree Vim editor is a file system browser. Using this plug-in, users can intuitively navigate complex directory hierarchy, quickly open the file for reading or editing, as well as perform basic file system operations.

This works best when working for large companies or projects, because it is difficult to find a document that contains the name of a line and regional content you want to change. Thus, using this plugin, you can perform basic file system operations, easily navigate through complex directory of important chains, even reading can open these records wherever they are needed, and modify the document by quickly.

Brisk key operation will be perpendicular fashion open a browser window, you do not need to spend a lot of time to browse the desired records and open it. For a lot of code classification, it is absolutely necessary. For those individuals is difficult to remember the file name, the same is also true.

If you want to automatically open when Vim NERDTree start? Paste the following code in your vimrc:

autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif

Get Nerd-tree

3、Ack

Recommendation applies to Vim plugin for programmers and developers

Ack is one of the world Vim plugin programmer commonly used. This particular plug-in basically acts as a search tool in the programmer's coding Vim. From time to time we have to search for a specific file that contains a particular line or even just a word, but it is suitable for ack Vim user plug-ins.

It not only allows us to search for files in Vim, but also can display the results in a separate window, split, so that we can improve. Most importantly, it also shows the line number of events, each event once.

Help command:

:help Ack

Get Ack

to sum up

This article first introduces three bars, super-stable characteristics Vim plugin Vim plug-in feature may be the best part. With every other day there is a new plug-in is released, you can greatly improve the use Vim experience. vim plugin simplifies our work in vim, but also make things very interesting and attractive.

These are just our selection of various Vim plug-in a small part. We hope that it will help. Please do not forget to share our articles, and to help others understand this knowledge.

Guess you like

Origin www.linuxidc.com/Linux/2020-03/162693.htm