helix: Add match operator (#34060)

This is an implementation of matching like "m i (", as well as "] (" and
"[ (" in `helix_mode` with a few supported objects and a basis for more.

Release Notes:

- Added helix operators for selecting text objects

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
fantacell
2025-09-08 08:48:47 -06:00
committed by GitHub
co-authored by Conrad Irwin
parent 3f80ac0127
commit 10989c702c
12 changed files with 1196 additions and 69 deletions
+9
View File
@@ -495,10 +495,19 @@ impl Vim {
self.replace_with_register_object(object, around, window, cx)
}
Some(Operator::Exchange) => self.exchange_object(object, around, window, cx),
Some(Operator::HelixMatch) => {
self.select_current_object(object, around, window, cx)
}
_ => {
// Can't do anything for namespace operators. Ignoring
}
},
Some(Operator::HelixNext { around }) => {
self.select_next_object(object, around, window, cx);
}
Some(Operator::HelixPrevious { around }) => {
self.select_previous_object(object, around, window, cx);
}
Some(Operator::DeleteSurrounds) => {
waiting_operator = Some(Operator::DeleteSurrounds);
}