Vim auto-complete, vim auto-complete, and so on. In summary, copy and paste the following code ~ /. Vimrc, save, close all vim, and open it. Enter the cursor inside the brackets. Www.2cto.com [plain]: inoremap () <ESC> I: inoremap) <c-r> = ClosePair (') <CR>: inoremap {{}< ESC> I: inoremap} <c-r >= ClosePair ('}') <CR>: inoremap [[] <ESC> I: inoremap] <c-r> = ClosePair (']') <CR>: inoremap <> <ESC> I: inoremap> <c-r> = ClosePair ('>') <CR> function ClosePair (char) if getline ('. ') [col ('. ')-1] = a: char return "/<Right>" else return a: char endif endf www.2cto.com Auto completion 1: Ctrl + p and Ctrl + n For example, enter [plain] $ total = $ ch_arrary [1] + in a row, and press "Ctrl + p" in vim to display two options, $ total and $ ch_arrary options. You can press ctrl + p in the two options to select the same principle. ctrl + n is also the same Automatic completion vim option: 1: case-insensitive ": After set ignorecase enables this option, if you want to complete the ins, INSERT, InSide or instep will be the most candidates. Www.2cto.com 2: Case Sensitive ": set infercase". If you want to complete the ins, there will be such words as instep, inside, and insert. The most basic usage is. Of course there are still complicated designs.