vim: Add Separator and RemoveIndent in Join Lines, fix gJ use space join (#22496)

Closes #22492

Release Notes:

- Added Join Lines Separator And RemoveIndent

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
0x2CA
2025-01-07 17:04:49 +00:00
committed by GitHub
co-authored by Conrad Irwin
parent 677868ba1a
commit 4deab8a0b9
6 changed files with 98 additions and 26 deletions
+40
View File
@@ -367,6 +367,46 @@ async fn test_join_lines(cx: &mut gpui::TestAppContext) {
two three fourˇ five
six
"});
cx.set_shared_state(indoc! {"
ˇone
two
three
four
five
six
"})
.await;
cx.simulate_shared_keystrokes("g shift-j").await;
cx.shared_state().await.assert_eq(indoc! {"
oneˇtwo
three
four
five
six
"});
cx.simulate_shared_keystrokes("3 g shift-j").await;
cx.shared_state().await.assert_eq(indoc! {"
onetwothreeˇfour
five
six
"});
cx.set_shared_state(indoc! {"
ˇone
two
three
four
five
six
"})
.await;
cx.simulate_shared_keystrokes("j v 3 j g shift-j").await;
cx.shared_state().await.assert_eq(indoc! {"
one
twothreefourˇfive
six
"});
}
#[cfg(target_os = "macos")]