vim: subword motions (#8725)

Add subword motions to vim, inspired by
[nvim-spider](https://github.com/chrisgrieser/nvim-spider),
[CamelCaseMotion](https://github.com/bkad/CamelCaseMotion).


Release Notes:

- Added subword motions to vim
This commit is contained in:
Rom Grk 2024-03-07 21:36:12 -05:00 committed by GitHub
parent 467a179837
commit d247086b21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 491 additions and 93 deletions

View file

@ -159,6 +159,19 @@ impl VimTestContext {
assert_eq!(self.mode(), mode_after, "{}", self.assertion_context());
assert_eq!(self.active_operator(), None, "{}", self.assertion_context());
}
pub fn assert_binding_normal<const COUNT: usize>(
&mut self,
keystrokes: [&str; COUNT],
initial_state: &str,
state_after: &str,
) {
self.set_state(initial_state, Mode::Normal);
self.cx.simulate_keystrokes(keystrokes);
self.cx.assert_editor_state(state_after);
assert_eq!(self.mode(), Mode::Normal, "{}", self.assertion_context());
assert_eq!(self.active_operator(), None, "{}", self.assertion_context());
}
}
impl Deref for VimTestContext {