From cae9f0e7f42cd1359eb5942fb9e323e47e2c7570 Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Sat, 1 Feb 2025 08:37:41 +0100 Subject: [PATCH] Add tmux yanking --- home/terminal/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/terminal/default.nix b/home/terminal/default.nix index 92884e9..b75f53e 100644 --- a/home/terminal/default.nix +++ b/home/terminal/default.nix @@ -110,6 +110,7 @@ keyMode = "vi"; customPaneNavigationAndResize = true; plugins = with pkgs.tmuxPlugins; [ + yank vim-tmux-navigator ]; extraConfig = '' @@ -142,6 +143,15 @@ # Correct colors set -g default-terminal "tmux-256color" set -ga terminal-overrides ",*256col*:Tc" + + # Keybindings for yank + bind-key -T copy-mode-vi v send-keys -X begin-selection + bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle + bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel + + # Open split with current working directory + bind '"' split-window -v -c "#{pane_current_path}" + bind % split-window -h -c "#{pane_current_path}" ''; };