LunarWatcher / auto-pairs

Vim plugin, insert or delete brackets, parentheses, and quotes in pairs
MIT License
173 stars 6 forks source link

Delete both parentheses at once #88

Closed IC0hO closed 5 months ago

IC0hO commented 5 months ago

When "void f" is typed and then the "(" character is entered, it will automatically complete the parentheses, resulting in "void f()" with the cursor positioned between the parentheses. Now, with "void f()" and no content inside the parentheses, if you want to delete the parentheses, you can only delete the opening parenthesis first, and then move the cursor to delete the right parenthesis. In contrast, VSCode allows you to delete both the left and right parentheses at once.

Therefore, it would be desirable to have a feature where, in a case like "void f()" with the cursor positioned between the empty parentheses, pressing the backspace key could delete the entire pair of parentheses in one step.

LunarWatcher commented 5 months ago

Already exists, but it's disabled by default. See #61

IC0hO commented 5 months ago

Okay, I didn't read the documentation, thanks for the help.