Closed nyrahul closed 5 years ago
set -g mouse on bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" bind -n WheelDownPane select-pane -t= \; send-keys -M bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M bind -t vi-copy C-WheelUpPane halfpage-up bind -t vi-copy C-WheelDownPane halfpage-down bind -t emacs-copy C-WheelUpPane halfpage-up bind -t emacs-copy C-WheelDownPane halfpage-down # To copy, drag to highlight text in yellow, press Enter and then release mouse # Use vim keybindings in copy mode setw -g mode-keys vi # Update default binding of `Enter` to also use copy-pipe unbind -t vi-copy Enter bind-key -t vi-copy Enter copy-pipe "pbcopy" set -g history-limit 5000 set -g status off
add tmux to setup.sh
start tmux through bashrc
[[ $TERM != "screen" ]] && exec tmux
added