From 33be2cf3be56d1bf383ab9bf19b8187a4d9d03df Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Mon, 22 May 2023 14:47:13 +0200 Subject: [PATCH] tmux: Cancel copy-mode with insert-mode bindings --- .config/tmux/tmux.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index f7350af..2e43357 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -91,6 +91,12 @@ bind -T copy-mode-vi y send -X copy-pipe "xclip -selection clipboard" bind -T copy-mode-vi Escape \ if -F "#{selection_present}" { send -X clear-selection } { send -X cancel } +# Use insert-mode-like bindings to cancel copy-mode +bind -T copy-mode-vi A send -X cancel +bind -T copy-mode-vi I send -X cancel +bind -T copy-mode-vi a send -X cancel +bind -T copy-mode-vi i send -X cancel + # Navigate panes with -[hjkl] # NOTE: C-[hjkl] (w/o prefix) moves through vim splits and tmux panes # See vim-tmux-navigator