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:
parent
467a179837
commit
d247086b21
6 changed files with 491 additions and 93 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue