vim: smartcase find option (#9033)
Release Notes: - Added option `use_smartcase_find` to the vim-mode
This commit is contained in:
parent
d247086b21
commit
f67abd2943
5 changed files with 127 additions and 22 deletions
|
@ -1020,6 +1020,48 @@ mod test {
|
|||
);
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_f_and_t_smartcase(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = VimTestContext::new(cx, true).await;
|
||||
cx.update_global(|store: &mut SettingsStore, cx| {
|
||||
store.update_user_settings::<VimSettings>(cx, |s| {
|
||||
s.use_smartcase_find = Some(true);
|
||||
});
|
||||
});
|
||||
|
||||
cx.assert_binding(
|
||||
["f", "p"],
|
||||
indoc! {"ˇfmt.Println(\"Hello, World!\")"},
|
||||
Mode::Normal,
|
||||
indoc! {"fmt.ˇPrintln(\"Hello, World!\")"},
|
||||
Mode::Normal,
|
||||
);
|
||||
|
||||
cx.assert_binding(
|
||||
["shift-f", "p"],
|
||||
indoc! {"fmt.Printlnˇ(\"Hello, World!\")"},
|
||||
Mode::Normal,
|
||||
indoc! {"fmt.ˇPrintln(\"Hello, World!\")"},
|
||||
Mode::Normal,
|
||||
);
|
||||
|
||||
cx.assert_binding(
|
||||
["t", "p"],
|
||||
indoc! {"ˇfmt.Println(\"Hello, World!\")"},
|
||||
Mode::Normal,
|
||||
indoc! {"fmtˇ.Println(\"Hello, World!\")"},
|
||||
Mode::Normal,
|
||||
);
|
||||
|
||||
cx.assert_binding(
|
||||
["shift-t", "p"],
|
||||
indoc! {"fmt.Printlnˇ(\"Hello, World!\")"},
|
||||
Mode::Normal,
|
||||
indoc! {"fmt.Pˇrintln(\"Hello, World!\")"},
|
||||
Mode::Normal,
|
||||
);
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_percent(cx: &mut TestAppContext) {
|
||||
let mut cx = NeovimBackedTestContext::new(cx).await.binding(["%"]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue