vim: Add ~ to change case

Fixes: zed-industries/community#1410
This commit is contained in:
Conrad Irwin 2023-06-26 20:19:28 -06:00
parent 77dc22bff6
commit a9aa5e5196
3 changed files with 70 additions and 0 deletions

View file

@ -1,3 +1,4 @@
mod case;
mod change;
mod delete;
mod substitute;
@ -24,6 +25,7 @@ use serde::Deserialize;
use workspace::Workspace;
use self::{
case::change_case,
change::{change_motion, change_object},
delete::{delete_motion, delete_object},
substitute::substitute,
@ -48,6 +50,7 @@ actions!(
Paste,
Yank,
Substitute,
ChangeCase,
]
);
@ -59,6 +62,7 @@ pub fn init(cx: &mut AppContext) {
cx.add_action(insert_end_of_line);
cx.add_action(insert_line_above);
cx.add_action(insert_line_below);
cx.add_action(change_case);
cx.add_action(|_: &mut Workspace, _: &Substitute, cx| {
Vim::update(cx, |vim, cx| {
let times = vim.pop_number_operator(cx);