feat: Added more keybinds from vim to zed
This commit is contained in:
@@ -20,15 +20,33 @@
|
|||||||
"javascript"
|
"javascript"
|
||||||
"typescript"
|
"typescript"
|
||||||
];
|
];
|
||||||
userKeymaps = [
|
userKeymaps = let
|
||||||
{
|
# keymaps should be like this:
|
||||||
context = "Workspace";
|
# ```nix
|
||||||
bindings = {
|
# {
|
||||||
|
# "Workspace" = {
|
||||||
|
# "ctrl-\\" = "workspace::ToggleBottomDock";
|
||||||
|
# "ctrl-h" = "editor::Backspace";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ```
|
||||||
|
mkMap = keymaps:
|
||||||
|
lib.mapAttrsToList (context: bindings: {
|
||||||
|
inherit context;
|
||||||
|
inherit bindings;
|
||||||
|
# use_key_equivalents = true;
|
||||||
|
})
|
||||||
|
keymaps;
|
||||||
|
in
|
||||||
|
mkMap {
|
||||||
|
"Workspace" = {
|
||||||
"ctrl-\\" = "workspace::ToggleBottomDock";
|
"ctrl-\\" = "workspace::ToggleBottomDock";
|
||||||
"ctrl-shift-r" = "workspace::ToggleRightDock";
|
"ctrl-shift-r" = "workspace::ToggleRightDock";
|
||||||
|
"ctrl-b" = "workspace::ToggleLeftDock";
|
||||||
"ctrl-k" = "editor::GoToDefinition";
|
"ctrl-k" = "editor::GoToDefinition";
|
||||||
"ctrl-n" = null;
|
"ctrl-n" = null;
|
||||||
"ctrl-p" = null;
|
"ctrl-p" = null;
|
||||||
|
"ctrl-shift-h" = null;
|
||||||
"space f f" = [
|
"space f f" = [
|
||||||
"task::Spawn"
|
"task::Spawn"
|
||||||
{
|
{
|
||||||
@@ -51,26 +69,26 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
"Editor" = {
|
||||||
{
|
|
||||||
context = "Editor";
|
|
||||||
use_key_equivalents = true;
|
|
||||||
bindings = {
|
|
||||||
"ctrl-shift-r" = "workspace::ToggleRightDock";
|
|
||||||
"ctrl-k" = "editor::GoToDefinition";
|
"ctrl-k" = "editor::GoToDefinition";
|
||||||
"ctrl-t" = "pane::GoBack";
|
"ctrl-t" = "pane::GoBack";
|
||||||
"ctrl-l" = "editor::AcceptEditPrediction";
|
"ctrl-l" = "editor::AcceptEditPrediction";
|
||||||
"ctrl-\\" = "workspace::ToggleBottomDock";
|
"ctrl-\\" = "workspace::ToggleBottomDock";
|
||||||
|
"ctrl-b" = "workspace::ToggleLeftDock";
|
||||||
|
"space n" = "pane::ActivateNextItem";
|
||||||
|
"space p" = "pane::ActivatePreviousItem";
|
||||||
|
"space space" = "pane::ActivateLastItem";
|
||||||
|
"space q" = "pane::CloseActiveItem";
|
||||||
};
|
};
|
||||||
}
|
"vim_mode == insert" = {
|
||||||
{
|
|
||||||
context = "vim_mode == insert";
|
|
||||||
bindings = {
|
|
||||||
"ctrl-k" = "editor::GoToDefinition";
|
"ctrl-k" = "editor::GoToDefinition";
|
||||||
"ctrl-l" = "editor::AcceptEditPrediction";
|
"ctrl-l" = "editor::AcceptEditPrediction";
|
||||||
|
"ctrl-h" = "editor::Backspace";
|
||||||
|
"space f f" = null;
|
||||||
|
"space f g" = null;
|
||||||
|
"space g g" = null;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
];
|
|
||||||
userSettings = {
|
userSettings = {
|
||||||
features = {
|
features = {
|
||||||
edit_prediction_provider = "copilot";
|
edit_prediction_provider = "copilot";
|
||||||
|
|||||||
Reference in New Issue
Block a user