From 8755ade944e4f163bc0fe30b1db3342e89a14e8f Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 24 Jun 2022 23:42:57 +0200 Subject: [PATCH] tmux: Format lines to fit into a width of 80 --- .config/tmux/tmux.conf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 48a1453..5d6087a 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -16,7 +16,8 @@ set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # especially annoying/dangerous when holding C-d down to scroll to the bottom. # (This is practically the default binding except for the `-e` flag for # `copy-mode`) -bind -n WheelUpPane if -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send -M } { copy-mode -u } +bind -n WheelUpPane \ + if -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send -M } { copy-mode -u } bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -XN5 scroll-up bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -XN5 scroll-down @@ -65,7 +66,8 @@ bind-key -T copy-mode-vi v send-keys -X begin-selection 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 } +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 @@ -118,9 +120,10 @@ set -g @resurrect-strategy-vim 'session' set -g @resurrect-strategy-nvim 'session' # Save sessions before detaching unbind -T prefix d -bind-key -T prefix d \ - run-shell "$XDG_CONFIG_HOME/tmux/plugins/tmux-resurrect/scripts/save.sh" \; \ +bind-key -T prefix d { + run-shell "$XDG_CONFIG_HOME/tmux/plugins/tmux-resurrect/scripts/save.sh"; detach-client +} ## Theming. Inspired by: ## https://github.com/Who23/dots/blob/21976e76644d8d9261ebdcf61733d2181a1612eb/tmux.conf