fix(editor): Fix vim mode quit and add "wq"

This changes `:q` to be quit (w/o saving) and added `:wq` to save *and* close.
This commit is contained in:
Billy Vong 2021-12-30 13:14:54 -05:00
parent b578e09986
commit 38366e45db

@ -178,7 +178,12 @@ export function Root(props: IProps): React.ReactElement {
save(); save();
}); });
MonacoVim.VimMode.Vim.defineEx("quit", "q", function () { MonacoVim.VimMode.Vim.defineEx("quit", "q", function () {
props.router.toTerminal();
});
// "wqriteandquit" is not a typo, prefix must be found in full string
MonacoVim.VimMode.Vim.defineEx("wqriteandquit", "wq", function () {
save(); save();
props.router.toTerminal();
}); });
editor.focus(); editor.focus();
}); });