Improved zed keybinds

This commit is contained in:
Emmet 2025-11-08 18:09:09 -06:00
parent d6656137cb
commit 36eabc0203

View file

@ -1,8 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.userSettings.zed; cfg = config.userSettings.zed;
in { in
{
options = { options = {
userSettings.zed = { userSettings.zed = {
enable = lib.mkEnableOption "Enable zed editor"; enable = lib.mkEnableOption "Enable zed editor";
@ -138,21 +144,61 @@ in {
"space b n" = "panel::NextPanelTab"; "space b n" = "panel::NextPanelTab";
"space b i" = "tab_switcher::ToggleAll"; "space b i" = "tab_switcher::ToggleAll";
"ctrl-i" = "tab_switcher::ToggleAll"; "ctrl-i" = "tab_switcher::ToggleAll";
"alt-p" = [ "tab_switcher::Toggle" { "select_last" = true; }];
"alt-n" = "tab_switcher::Toggle";
"alt-z" = "terminal_panel::Toggle"; "alt-z" = "terminal_panel::Toggle";
"alt-d" = "debug_panel::ToggleFocus"; "alt-d" = "debug_panel::ToggleFocus";
}; };
} }
{
context = "OutlinePanel";
bindings = {
"ctrl-h" = "workspace::ActivatePaneLeft";
"ctrl-l" = "workspace::ActivatePaneRight";
"ctrl-j" = "workspace::ActivatePaneDown";
"ctrl-k" = "workspace::ActivatePaneUp";
};
}
{
context = "OutlinePanel && not_editing";
bindings = {
"q" = "workspace::ToggleLeftDock";
};
}
{
context = "ProjectPanel";
bindings = {
"ctrl-h" = "workspace::ActivatePaneLeft";
"ctrl-l" = "workspace::ActivatePaneRight";
"ctrl-j" = "workspace::ActivatePaneDown";
"ctrl-k" = "workspace::ActivatePaneUp";
};
}
{
context = "ProjectPanel && not_editing";
bindings = {
"tab" = "project_panel::OpenPermanent";
"q" = "workspace::ToggleLeftDock";
"r" = "project_panel::Rename";
"D" = "project_panel::Delete";
};
}
{ {
context = "Terminal"; context = "Terminal";
bindings = { bindings = {
"ctrl-space w d" = "pane::CloseAllItems";
"ctrl-space b d" = "pane::CloseActiveItem";
"ctrl-space b p" = "panel::PreviousPanelTab";
"ctrl-space b n" = "panel::NextPanelTab";
"ctrl-space b i" = "tab_switcher::ToggleAll";
"ctrl-w" = "pane::CloseActiveItem"; "ctrl-w" = "pane::CloseActiveItem";
"alt-z" = "terminal_panel::Toggle"; "alt-z" = "terminal_panel::Toggle";
"alt-d" = "debug_panel::ToggleFocus"; "alt-d" = "debug_panel::ToggleFocus";
"ctrl-i" = "tab_switcher::ToggleAll"; "ctrl-i" = "tab_switcher::ToggleAll";
"alt-p" = [ "tab_switcher::Toggle" { "select_last" = true; }]; "alt-p" = [
"alt-n" = "tab_switcher::Toggle"; "tab_switcher::Toggle"
{ "select_last" = true; }
];
"ctrl-p" = null;
"ctrl-n" = null;
}; };
} }
{ {