Could not determine some vimrc settings

I hit the following lines in the vimrc file and cannot figure out what they should do or how they should work. Resets using the $ sign. Does it have any special meaning or is it used in the usual way, like any other symbol?

" Parenthesis/bracket expanding vnoremap $1 <esc>`>a)<esc>`<i(<esc> vnoremap $2 <esc>`>a]<esc>`<i[<esc> vnoremap $3 <esc>`>a}<esc>`<i{<esc> vnoremap $$ <esc>`>a"<esc>`<i"<esc> vnoremap $q <esc>`>a'<esc>`<i'<esc> vnoremap $e <esc>`>a"<esc>`<i"<esc> " Map auto complete of (, ", ', [ inoremap $1 ()<esc>i inoremap $2 []<esc>i inoremap $3 {}<esc>i inoremap $4 {<esc>o}<esc>O inoremap $q ''<esc>i inoremap $e ""<esc>i inoremap $t <><esc>i 

If anyone is interested. This is a link to vimrc

+4
source share
1 answer

Look at only two of them.

The first is the visual mode display :

 " Parenthesis/bracket expanding vnoremap $1 <esc>`>a)<esc>`<i(<esc> 

This inserts () choice as you type $ 1 . First, it goes to the end of the selection ( '> ) and a ppend a ) before proceeding to the beginning of the selection ( '< ) and i nsert ing a ( .

This is the insert in display mode :

 " Map auto complete of (, ", ', [ inoremap $1 ()<esc>i 

Inserts () when entering $ 1 and moves the cursor between two brackets.

+8
source

Source: https://habr.com/ru/post/1400706/


All Articles