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-08 01:04:49 +08:00 committed by GitHub
parent 677868ba1a
commit 4deab8a0b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 98 additions and 26 deletions

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")]