-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vim: Add AnyQuotes support for unified quote handling similar to mini…
….ai nvim (#22263) ### Edit 1: I tested it locally and it works! ### IMPORTANT: **Feedback and suggestions for improvement are greatly appreciated!** This commit introduces a new AnyQuotes text object to handle text surrounded by single quotes ('), double quotes ("), or back quotes (`) seamlessly. The following changes are included: - Added AnyQuotes to the Object enum to represent the new feature. - Registered AnyQuotes as an action in the actions! macro and register function to ensure proper integration with Vim actions like ci, ca, di, and da. - Extended Object::range to check for surrounding single, double, or back quotes sequentially. - Updated methods like is_multiline and always_expands_both_ways to ensure consistent behavior with other text objects. - Added support in surrounding_markers to evaluate any of the quote types when AnyQuotes is invoked. - This enhancement provides users with a flexible and unified way to interact with text objects enclosed by different types of quotes. Release Notes: - vim: Add `aq`/`iq` "any quote" text objects that are the smallest of `a"`, `a'` or <code>a`</code>
- Loading branch information
Showing
2 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters