Ubuntu - change tmux 1.8 to tmux-next 1.9

Sonique picture Sonique · May 12, 2015 · Viewed 13.2k times · Source

After I tried install few plugins for tmux I found that my tmux version is 1.8.

Following steps from this answer I install tmux 2.1: Ugrade tmux from 1.8 to 1.9 on Ubuntu 14.04 (I didn't found tmux=1.9a-1~ppa1~t and instead install tmux-next and substitute link in usr bin with sudo ln -sf $(which tmux-next) /usr/bin/tmux

Tmux works nicely, but didn't load my config. I tried tmux source, but now I should tmux source every time I use tmux.

And after all I get this errors:

unknown option: mode-mouse
unknown option: mode-mouse
unknown option: mouse-select-pane
unknown option: mouse-resize-pane
unknown option: mouse-select-window
unknown option: mode-mouse
unknown option: mode-mouse

Is tmux-next the same tmux? And what I should do to load .tmux.conf automatically?

Answer

smileart picture smileart · May 12, 2015

Just have installed tmux 2.1 on Ubuntu Server and faced the same problem. The solution for me is to delete all those unknown options and add those lines instead:

 set -g mouse-utf8 on
 set -g mouse on

Now in tmux 2.1 I can choose a pane, a window and resize everything with a mouse as it was in tmux 1.8

MOUSE SUPPORT section of 'man tmux':

"The default key bindings allow the mouse to be used to select and resize panes, to copy text and to change window using the status line. These take effect if the mouse option is turned on."


UPDATE (since there are a lot of questions):

0 Install:

brew cask install easysimbl

1 Download .dmg file here: https://bitheap.org/mouseterm/

2 Execute:

cd /Volumes/MouseTerm && cp -r MouseTerm.bundle /Library/Application\ Support/SIMBL/Plugins

3 Add this to your .tmux.conf file:

set -g mouse-utf8 on
set -g mouse on
bind -n WheelUpPane   select-pane -t= \; copy-mode -e \; send-keys -M
bind -n WheelDownPane select-pane -t= \;                 send-keys -M

4 Reload tmux

5 Scroll!!!1

I hope this will help. Works for me on iTerm 2/OS X El Capitan/tmux-2.1