blob: 6d82da5a54b73d0bdcc6238e04cb6945587c093f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
*autobrace.txt* Automatically insert closing braces and quotes
Author: Jesse Luehrs <https://tozt.net/>
License: MIT
=============================================================================
OVERVIEW *autobrace-overview*
This plugin rebinds some characters to make typing matching characters easier.
Specifically, it does these things:
* Opening brace and quote characters (specifically, `(`,
`[`, `{`, `'`, and `"`) are mapped to make them automatically insert their
corresponding closing character. `'` is special-cased to not insert the
closing character when typed after a word character, to avoid triggering
when typing words with apostrophes.
* Typing a closing brace or quote character while the next character past the
cursor is that character will skip over it instead of inserting it.
* Pressing <CR> when the next character is a closing brace will insert two
newlines, and leave the cursor in the middle.
* Pressing <BS> when the previous character is an open brace and there is
nothing but whitespace between the open brace and closing brace will delete
both the open and closing brace.
=============================================================================
CONFIGURATION *autobrace-configuration*
None yet, but I'm open to suggestions!
=============================================================================
BUGS *autobrace-bugs*
Due to limitations in Vimscript, using this plugin will tend to break using
the `.` operator to repeat insert operations, since the mappings bounce in and
out of normal mode. Suggestions welcome for how to fix this, but as far as I
can tell, it's not actually possible to fix in general currently.
vim:tw=78:et:ft=help:norl:
|