diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 7842429..48a1453 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -64,6 +64,9 @@ bind-key -T copy-mode-vi v send-keys -X begin-selection # Yank into system clipboard bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -selection clipboard" +# Clear selection or cancel copy-mode when nothing is selected +bind -T copy-mode-vi Escape if -F "#{selection_present}" { send -X clear-selection } { send -X cancel } + # Navigate panes with -[hjkl] # NOTE: C-[hjkl] (w/o prefix) moves through vim splits and tmux panes # See vim-tmux-navigator