From 4e6224981eabb6ff77998e1d7862566eb1bae8a1 Mon Sep 17 00:00:00 2001 From: Fabian Ising Date: Mon, 17 Jul 2023 11:12:48 +0200 Subject: [PATCH] [tmux] Improve copy mode, add F12 key toggle --- tmux/.tmux.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 0f86adf..9e567ad 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -10,6 +10,19 @@ bind-key C-a send-prefix bind-key -n C-b send-keys C-b #bind-key -n C-b send-prefix +# Use F12 to toggle hotekys on/off for nested remote tmux sessions +bind -T root F12 \ + set prefix None \;\ + set key-table off \;\ + set status-style "fg=colour245,bg=colour238"\;\ + refresh-client -S + +bind -T off F12 \ + set -u prefix \;\ + set -u key-table \;\ + set -u status-style \;\ + refresh-client -S + setw -g mode-keys vi set-option -g status-keys vi @@ -62,6 +75,8 @@ set-window-option -g mode-keys vi set-option -s set-clipboard on set -g @yank_with_mouse off set -g @yank_action 'copy-pipe' +bind-key -Tcopy-mode-vi 'C-right' send -X next-word +bind-key -Tcopy-mode-vi 'C-left' send -X previous-word if '[ `uname` == Darwin ]' \ 'source-file ~/.tmux/.mac_config'