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 the omission of the right brackets... information & nb
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 parentheses to locate the brackets. you can either move it to the direction key, which may cause the hand to deviate from the main key area or press Switch to the command mode and press I to enter the insert mode. then the cursor is placed in brackets. this is too painful. with vim's key ing function, this problem can be solved perfectly, you only need to do the following key ing: imap () Iimap [] Iimap {} I www.2cto.com, you only need to press the Meta key (in PC, usually the Alt key) while pressing the left parenthesis ), you can automatically enter both the right brackets and place the cursor in the brackets to wait 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 Int main () { } O Return 0; O
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.