Implement regex_select action for Helix (#38736)
Closes #31561 Release Notes: - Implemented the select_regex Helix keymap Prior: The keymap `s` defaulted to `vim::Substitute` After: <img width="1387" height="376" alt="image" src="https://github.com/user-attachments/assets/4d3181d9-9d3f-40d2-890f-022655c77577" /> Thank you to @ConradIrwin for pairing to work on this
This commit is contained in:
@@ -195,6 +195,7 @@ impl Vim {
|
||||
prior_selections,
|
||||
prior_operator: self.operator_stack.last().cloned(),
|
||||
prior_mode,
|
||||
helix_select: false,
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -218,6 +219,12 @@ impl Vim {
|
||||
let new_selections = self.editor_selections(window, cx);
|
||||
let result = pane.update(cx, |pane, cx| {
|
||||
let search_bar = pane.toolbar().read(cx).item_of_type::<BufferSearchBar>()?;
|
||||
if self.search.helix_select {
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
search_bar.select_all_matches(&Default::default(), window, cx)
|
||||
});
|
||||
return None;
|
||||
}
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
let mut count = self.search.count;
|
||||
let direction = self.search.direction;
|
||||
|
||||
Reference in New Issue
Block a user