Load all keybindings from JSON file
This commit is contained in:
parent
b4babbeeaa
commit
9a4b8e3d8c
9 changed files with 81 additions and 53 deletions
|
@ -1,16 +1,10 @@
|
|||
use crate::{mode::Mode, SwitchMode, VimState};
|
||||
use gpui::{actions, keymap::Binding, MutableAppContext, ViewContext};
|
||||
use gpui::{actions, MutableAppContext, ViewContext};
|
||||
use workspace::Workspace;
|
||||
|
||||
actions!(vim, [MoveToStart]);
|
||||
|
||||
pub fn init(cx: &mut MutableAppContext) {
|
||||
let context = Some("Editor && vim_mode == normal && vim_submode == g");
|
||||
cx.add_bindings(vec![
|
||||
Binding::new("g", MoveToStart, context),
|
||||
Binding::new("escape", SwitchMode(Mode::normal()), context),
|
||||
]);
|
||||
|
||||
cx.add_action(move_to_start);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue