all repos — dotfiles @ 6d79b364fff07095f838185c6c4abbf9941a4ee6

my *nix dotfiles

programs/zed/keymap.nix (view raw)

 1{ pkgs, ... }:
 2
 3let
 4  keymap = [
 5    {
 6      context = "Dock || Terminal || Editor";
 7      bindings = {
 8        "alt-y" = [ "workspace::ActivatePaneInDirection" "Left" ];
 9        "alt-o" = [ "workspace::ActivatePaneInDirection" "Right" ];
10        "alt-e" = [ "workspace::ActivatePaneInDirection" "Up" ];
11        "alt-n" = [ "workspace::ActivatePaneInDirection" "Down" ];
12      };
13    }
14    {
15      context = "VimControl && !VimWaiting && !menu";
16      bindings = {
17        "space o" = "tab_switcher::Toggle";
18        "space t" = "workspace::NewCenterTerminal";
19        "space n" = "pane::ActivateNextItem";
20        "space p" = "pane::ActivatePrevItem";
21        "space e" = "file_finder::Toggle";
22        "space shift-e" = "workspace::NewSearch";
23      };
24    }
25    {
26      context = "Workspace";
27      bindings = {
28        "ctrl-q c" = "pane::SplitRight";
29        "ctrl-q \"" = "pane::SplitDown";
30      };
31    }
32  ];
33
34  keymapFile = pkgs.writeText "keymap.json" (builtins.toJSON keymap);
35in
36{
37  home.file.".config/zed/keymap.json".source = keymapFile;
38}