Matchit This plug-in, is Vim comes with, but the default is not installed. In Vim, you can use% to achieve jumps between parentheses, but with this plugin you can set any tag that you want to jump.
Knocking VI in Linux open a blank file
: Help Matchit-install
You can see the steps to install Matchit
It's under the Cd.vim folder.
mkdir ~/.vim/plugin
CP $VIMRUNTIME/macros/matchit.vim ~/.vim/plugin
mkdir ~/.vim/doc
CP $VIMRUNTIME/macros/matchit.txt ~/.vim/plugin
Then let b:match_words= ' \<begin\>:\<end\> ' Add to the. vimrc file
You can also add module,primitive and other strings that need to be matched to your needs.
This will be OK, open any file with% you can see the match between Begin end.
When the above two files are not vimruntime this environment variable, in Linux echo is also blank, and then echo in Vim came out, this variable is the installation path of VIM. If it is not available in Linux, it is OK to replace the variable directly with the path.
There is also a way to replace the above copy of the two files, in the. VIMRC Add the following words
SOURCE $VIMRUNTIME/macros/matchit.vim
Or
Runtime Macros/matchit.vim
You can also set this to ignore case sensitivity when matching, for example if you have this sentence in. vimrc
Let B:match_ignorecase = 1
is to ignore case, so begin and end can also match, if you want to turn off case sensitivity
Let B:match_ignorecase = 0
Really easy to use!!!
Vim implementation begin end pairing using Matchit plugin