vim: Add support for vim::PreviousLineStart motion (#14193)

Release Notes:

- vim: Added `-`/`+` to go to beginning of line above/below
([#14183](https://github.com/zed-industries/zed/issues/14183)).
- vim: (Breaking) Removed non-standard builtin binding from `-` to open
the project panel. You can re-add it to your keymap file with:
`{"context":"VimControl", "bindings":{ "-":
"pane::RevealInProjectPanel"}}`


Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.


https://github.com/zed-industries/zed/assets/32429059/0e9e9348-265e-4a81-a45a-4739034dc5d9

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
sherwyn 2024-07-12 07:36:07 +09:00 committed by GitHub
parent 12dfd4a2c2
commit e402d7e96a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 2 deletions

View file

@ -1279,3 +1279,22 @@ async fn test_find_multibyte(cx: &mut gpui::TestAppContext) {
.await
.assert_eq(r#"<label for="guests">ˇo</label>"#);
}
#[gpui::test]
async fn test_plus_minus(cx: &mut gpui::TestAppContext) {
let mut cx = NeovimBackedTestContext::new(cx).await;
cx.set_shared_state(indoc! {
"one
two
thrˇee
"})
.await;
cx.simulate_shared_keystrokes("-").await;
cx.shared_state().await.assert_matches();
cx.simulate_shared_keystrokes("-").await;
cx.shared_state().await.assert_matches();
cx.simulate_shared_keystrokes("+").await;
cx.shared_state().await.assert_matches();
}