tmux Mouse Mode

By Eric Lathrop on

I decided to try out tmux's mouse mode by adding set -g mouse on to my ~/.tmux.conf file. It is really nice being able to select and resize panes just by clicking on them. One thing I didn't expect was that when you have two vertical split panes, that dragging your mouse to select text would wrap correctly and only select text in a single pane! I had to add this command to my ~/.tmux.conf to make it automatically copy to the system clipboard:

bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"