Vim's automatic input configuration is used as the editor's God. vim's key ing function is very practical. When writing code, you often need to enter various parentheses, such as parentheses of function parameters, brackets of the array subject, braces of the function body, and so on. To avoid missing brackets, a pair of parentheses is usually input first and then positioned to add content to the brackets. However, vim is a pattern-based editor. It is troublesome to enter a pair of brackets and locate the brackets. You can either move it to the direction key, which may cause the hand to deviate from the main key area, either press <ESC> to switch to the command mode and then press I to enter the insert mode. Then the cursor is placed in brackets. This is too painful. With the help of vim's key ing function, to solve this problem perfectly, you only need to do the following key ing: imap <M-(> () <ESC> iimap <M-[> [] <ESC> iimap <M-{>{}< ESC> I www.2cto.com, you only need to press the Meta key (usually the Alt key on the PC) while pressing the left bracket, You can automatically enter the right bracket at the same time and place the cursor in the brackets for the input. When writing code, there are usually many similar things, such as the main function, you can also use one or two keys to automatically enter the main function and place the cursor at the position of the content to be added: imap <M-f> <M-m> int main () <Enter >{< Enter >}< ESC> O <TAB> return 0; <ESC> O <TAB>