Using the following mappings, when you type an open brace, a closing brace is automatically inserted on the same line after the cursor. If you quickly press Enter after the open brace (to begin a code block), the closing brace will be inserted on the line below the cursor. If you quickly press the open brace key again after the open brace, nothing extra will be inserted—you will just get a single open brace. Finally, if you quickly type an open and close brace, Vim will not do anything special. inoremap { {} inoremap { {}O inoremap {{ { inoremap {} {}
Attributes | Values |
---|
rdfs:label
| - Automatically append closing characters
|
rdfs:comment
| - Using the following mappings, when you type an open brace, a closing brace is automatically inserted on the same line after the cursor. If you quickly press Enter after the open brace (to begin a code block), the closing brace will be inserted on the line below the cursor. If you quickly press the open brace key again after the open brace, nothing extra will be inserted—you will just get a single open brace. Finally, if you quickly type an open and close brace, Vim will not do anything special. inoremap { {} inoremap { {}O inoremap {{ { inoremap {} {}
|
Version
| |
dbkwik:vim/property/wikiPageUsesTemplate
| |
Previous
| |
Category
| |
Text
| - AutoClose by Karl Guertin
- AutoClose by Thiago Alves
- Automatic LaTeX Plugin
- ClosePairs by Edoardo Vacchi
- auto-pairs Auto Pairs by Miao Jiang
- delimitMate by Israel Chauca Fuentes
- imaps.vim
- repeat.vim
- surround.vim
|
Author
| |
Complexity
| |
Created
| |
ID
| - 244(xsd:integer)
- 630(xsd:integer)
- 1697(xsd:integer)
- 1849(xsd:integer)
- 2009(xsd:integer)
- 2136(xsd:integer)
- 2373(xsd:integer)
- 2754(xsd:integer)
- 2945(xsd:integer)
- 3599(xsd:integer)
|
NEXT
| |
Rating
| |
abstract
| - Using the following mappings, when you type an open brace, a closing brace is automatically inserted on the same line after the cursor. If you quickly press Enter after the open brace (to begin a code block), the closing brace will be inserted on the line below the cursor. If you quickly press the open brace key again after the open brace, nothing extra will be inserted—you will just get a single open brace. Finally, if you quickly type an open and close brace, Vim will not do anything special. inoremap { {} inoremap { {}O inoremap {{ { inoremap {} {} One thing to be aware of with these mappings is that they will interrupt your undo sequence, as documented at [help ins-special-special]. This means that after using these mappings and inserting more text between the braces, pressing u will only undo the text inserted between the braces. Similarly, pressing . (repeat) will only insert the same text.
|