
## Why? Some users expressed a preference for the AnyQuotes and AnyBrackets text objects to align more closely with traditional Vim behavior, rather than the mini.ai plugin's approach. To address this, I’ve introduced two new text objects: MiniQuotes and MiniBrackets. These retain the mini.ai plugin behavior, while the updated AnyQuotes and AnyBrackets now follow the logic described in [this bug report](https://github.com/zed-industries/zed/issues/25563) and [this bug report](https://github.com/zed-industries/zed/issues/25562). ## Behavior Overview: ### AnyQuotes and AnyBrackets: These now prioritize the innermost range first (e.g., the closest quotes or brackets). If none are found, they fall back to searching the current line. This aligns with the behavior requested in the issue. ### MiniQuotes and MiniBrackets: These maintain the mini.ai plugin behavior, prioritizing the current line before expanding the search outward. ### Usage Examples: AnyQuotes: Works like ```ci', ci", ci` , ca', ca", ca` , etc.``` AnyBrackets: Works like ```ci(, ci[, ci{, ci<, ca(, ca[, ca{, ca<, etc.``` Please give these changes a try and let me know your thoughts! ### Release Notes: - vim: Add AnyQuotes, AnyBrackets, MiniQuotes and MiniBrackets text objects --------- Co-authored-by: Ben Kunkle <ben@zed.dev>
11 lines
358 B
JSON
11 lines
358 B
JSON
{"Put":{"state":"(trailingˇ whitespace )"}}
|
|
{"Key":"v"}
|
|
{"Key":"i"}
|
|
{"Key":"b"}
|
|
{"Get":{"state":"(«trailing whitespace ˇ»)","mode":"Visual"}}
|
|
{"Key":"escape"}
|
|
{"Key":"y"}
|
|
{"Key":"i"}
|
|
{"Key":"b"}
|
|
{"Get":{"state":"(ˇtrailing whitespace )","mode":"Normal"}}
|
|
{"ReadRegister":{"name":"\"","value":"trailing whitespace "}}
|