Auto close parentheses and repeat by dot dot dot...
Basically, you can automatically close pairs such as (), {}, "", ... But in advance, you can also customize the rule to automatically input any character on any context.
lexima.vim provides some default rules to input pairs. (the cursor position is represented by |)
Before | Input | After |
---|---|---|
` | ` | ( |
` | ` | " |
`"" | ` | " |
`'' | ` | ' |
| |
[ |
\[ |
| |
" |
\" |
| |
' |
\' |
`I | ` | 'm |
`( | )` | ) |
`' | '` | ' |
`( | )` | <BS> |
`' | '` | <BS> |
If you type foo("bar
, you get
foo("bar")
and you type 0.
, you finally get
foo("bar")foo("bar")