39

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?

Community
  • 1
  • 1
Sonique
  • 6,670
  • 6
  • 41
  • 60

2 Answers2

77

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

smileart
  • 1,598
  • 1
  • 15
  • 17
  • Thanks. First that I did is comment all mouse options. But anyway tmux don't take ~/.tmux.conf on startup and I don't know where tmux-next store config. One of solutions is alias `tmux='tmux source ~/.tmux.conf'` but it' is doesn't looks like true unix way. – Sonique May 12 '15 at 11:33
  • As I see tmux-next is actually just a package for tmux 2.1 which I installed from source. Sounds weird cause it is supposed to load ~/.tmux.conf file by default and it does on my server. Just in case (as a wild guess) try to load tmux with a backslash to avoid any aliases to be involved. Like: '\tmux'. – smileart May 12 '15 at 11:48
  • I store all configs in .dotfiles folder. So I tried to change alias to file, but not works. Don't know where to look... Tmux don't source ~/.tmux.conf – Sonique May 13 '15 at 07:53
  • Thanks this works ... But I still cannot get mouse scrolling without entering the copy mode. Is there a solution? – dragonxlwang Aug 09 '15 at 05:47
  • @dragonxlwang you could try installing this: https://bitheap.org/mouseterm/ and setting up scrolling mode auto enabling on scroll as in the previous tmux versions. – smileart Aug 10 '15 at 15:44
  • Scrolling does not work in putty either. Still no solution? – das_j Oct 23 '15 at 08:42
  • @dragonxlwang look at my update – smileart Oct 23 '15 at 12:11
  • OK, I'll admit that the scrolling works, but it;s soo slow and jerky as to be unusable, at least in iTerm & tmux. – Bruce Edge Nov 26 '15 at 06:08
  • tmux-next uses ~/.tmux-next.conf for config (mentioned at https://code.dogfood.paddev.net/~pi-rho/+recipe/tmux-next-daily) – mahemoff Mar 15 '16 at 15:36
  • For tmux version 2.1 , create ~/Library/Application\ Support/SIMBL/Plugins and copy MouseTerm.bundle there. – bits May 30 '16 at 13:34
  • to reload new config in all existing tmux shell: `tmux source-file ~/.tmux.conf` – bits May 30 '16 at 13:42
  • @bits I also have a key-binding for this purpose: `bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."` – smileart Jun 16 '16 at 08:25
  • @SmileArT, sorry. But after step three I can't copy text =( – Kenenbek Arzymatov Nov 05 '16 at 17:12
  • @RomaKarageorgievich In order to copy any text in my tmux I press and hold `alt`/`option` (⌥) key to select it and then copy as usual with ⌘-c. On Ubuntu it should be a `Shift` key, I believe. – smileart Nov 06 '16 at 10:34
31

Options mode-mouse, mouse-select-pane, mouse-resize-pane, mouse-select-window are deprecated. Use mouse option instead, it covers all the functionality of those four options:

set -g mouse on

The official deprecation dates back to v2.1, but the actual changes were introduced between v1.9 and v2.0.

user2683246
  • 3,399
  • 29
  • 31