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:
co-authored by
Conrad Irwin
parent
3f80ac0127
commit
10989c702c
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user