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 () & lt; ESC & gt; I: inorema...
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 (() I: inoremap) = ClosePair (')') : Inoremap {{} I: inoremap} = ClosePair ('}') : Inoremap [[] I: inoremap] = ClosePair (']') : Inoremap <> I: inoremap> = ClosePair ('> ') Function ClosePair (char) if getline ('.') [col ('.')-1] = a: char return "/ "Else return a: char endif endf www.2cto.com to automatically complete 1: Ctrl + p and Ctrl + n. For example: enter a line before you: [plain] $ total = $ ch_arrary [1] + and press Ctrl + p in vim. Two options are displayed, $ total and $ ch_arrary, you can press ctrl + p in the two options to select the same principle. ctrl + n is also the same auto-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.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service