diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 1f2402c..7b0982d 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -38,7 +38,11 @@ bind -T copy-mode-vi WheelUpPane send -XN5 scroll-up # Exit copy-mode when at the bottom. This practically mimics `copy-mode -e` but # only scrolling with the wheel (`-e` annoys me when scrolling down with `C-d`). bind -T copy-mode-vi WheelDownPane \ - if -F "#{==:0,#{scroll_position}}" {send -X cancel} {send -XN5 scroll-down} + if -F "#{==:0,#{scroll_position}}" { + send -X cancel + } { + send -XN5 scroll-down + } # Set C-a as new prefix unbind C-b @@ -135,11 +139,19 @@ bind -T copy-mode-vi C-v { # Yank into system clipboard with vim-like bindings bind -T copy-mode-vi y run-shell '${XDG_CONFIG_HOME:-$HOME/.config}/tmux/yank.sh' bind -T copy-mode-vi Y \ - if -F "#{selection_present}" { send -X copy-pipe-line } { send -X copy-pipe-end-of-line } + if -F "#{selection_present}" { + send -X copy-pipe-line + } { + send -X copy-pipe-end-of-line + } # 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 } + 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