From 9b286332cecbc0434c24395b54641ce1d3ebde58 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sat, 14 Oct 2023 11:30:58 -0700 Subject: [PATCH] added vim-like bindings --- modules/tmux.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/tmux.nix b/modules/tmux.nix index bc99d36..a592b17 100644 --- a/modules/tmux.nix +++ b/modules/tmux.nix @@ -12,5 +12,22 @@ in keyMode = "vi"; mouse = true; shell = "${pkgs.zsh}/bin/zsh"; + shortcut = "q"; + escapeTime = 0; + extraConfig = '' + bind -T copy-mode-vi v send-keys -X begin-selection + bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' + + # vim-like pane switching + bind -r ^ last-window + bind -r k select-pane -U + bind -r j select-pane -D + bind -r h select-pane -L + bind -r l select-pane -R + + # my-neovim-like panel splitting + bind -r v split-window -h + bind -r s split-window -v + ''; }; }