Auto Pairs is a Vim plugin by jiangmiao that enhances the editing experience by automatically inserting matching pairs of characters (brackets, quotes, parentheses, etc.) and handling their deletion intelligently. When you type an opening character such as (, {, [ or a quote, the plugin auto-inserts the corresponding closing character and places your cursor between them, so you can continue typing. If you type the closing character yourself when it's expected, the cursor may jump past it instead of inserting a duplicate. It supports intelligent deletion: pressing backspace when next to a matched pair will delete both characters. It also supports features like "fast wrap" (wrapping a word in a pair with a shortcut), skipping of auto-pairs in certain contexts (e.g., when inside a word or when preceded by a backslash), and customizing which pairs are active per buffer or file-type.
Features
- Automatic insertion of matching pairs when typing opening characters
- Intelligent jumping past or skipping of closing pair when appropriate
- Smart deletion of paired characters when pressing backspace
- Fast wrap a word or selection inside a defined pair via shortcut
- Customizable pair definitions and buffer-local pairs for file-type specific behavior
- Options to toggle plugin behaviour, map shortcuts for wrap/jump modes