Add vim-specific interactions to command

This mostly adds the commonly requested set (:wq and friends) and
a few that I use frequently
:<line> to go to a line number
:vsp / :sp to create a split
:cn / :cp to go to diagnostics
This commit is contained in:
Conrad Irwin 2023-09-07 22:48:01 -06:00
parent d42093e069
commit ea3a1745f5
7 changed files with 406 additions and 26 deletions

View file

@ -38,16 +38,31 @@ pub fn menus() -> Vec<Menu<'static>> {
MenuItem::action("Open Recent...", recent_projects::OpenRecent),
MenuItem::separator(),
MenuItem::action("Add Folder to Project…", workspace::AddFolderToProject),
MenuItem::action("Save", workspace::Save),
MenuItem::action(
"Save",
workspace::Save {
save_behavior: None,
},
),
MenuItem::action("Save As…", workspace::SaveAs),
MenuItem::action("Save All", workspace::SaveAll),
MenuItem::action(
"Save All",
workspace::SaveAll {
save_behavior: None,
},
),
MenuItem::action(
"Close Editor",
workspace::CloseActiveItem {
save_behavior: None,
},
),
MenuItem::action("Close Window", workspace::CloseWindow),
MenuItem::action(
"Close Window",
workspace::CloseWindow {
save_behavior: None,
},
),
],
},
Menu {