Simulate helix line wrapping (#32763)
In helix the `f`, `F`, `t`, `T`, left and right motions wrap lines. I added that by default. Release Notes: - vim: The `use_multiline_find` setting is replaced by binding to the correct action in the keymap: ``` "f": ["vim::PushFindForward", { "before": false, "multiline": true }], "t": ["vim::PushFindForward", { "before": true, "multiline": true }], "shift-f": ["vim::PushFindBackward", { "after": false, "multiline": true }], "shift-t": ["vim::PushFindBackward", { "after": true, "multiline": true }], ``` - helix: `f`/`t`/`shift-f`/`shift-t`/`h`/`l`/`left`/`right` are now multiline by default (like helix)
This commit is contained in:
parent
7be57baef0
commit
95cf153ad7
7 changed files with 60 additions and 104 deletions
|
@ -435,4 +435,37 @@ mod test {
|
|||
// Mode::HelixNormal,
|
||||
// );
|
||||
// }
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_f_and_t(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = VimTestContext::new(cx, true).await;
|
||||
|
||||
cx.set_state(
|
||||
indoc! {"
|
||||
The quˇick brown
|
||||
fox jumps over
|
||||
the lazy dog."},
|
||||
Mode::HelixNormal,
|
||||
);
|
||||
|
||||
cx.simulate_keystrokes("f z");
|
||||
|
||||
cx.assert_state(
|
||||
indoc! {"
|
||||
The qu«ick brown
|
||||
fox jumps over
|
||||
the lazˇ»y dog."},
|
||||
Mode::HelixNormal,
|
||||
);
|
||||
|
||||
cx.simulate_keystrokes("2 T r");
|
||||
|
||||
cx.assert_state(
|
||||
indoc! {"
|
||||
The quick br«ˇown
|
||||
fox jumps over
|
||||
the laz»y dog."},
|
||||
Mode::HelixNormal,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue