Is it possible to use the mouse to navigate between different window panes which are split vertically or horizontally?

up vote 67 down vote accepted

As of tmux 2.1, you can enable this by adding it to your .tmux.conf: set -g mouse on

  • Mouse-mode has been rewritten. There's now no longer options for:

    • mouse-resize-pane
    • mouse-select-pane
    • mouse-select-window
    • mode-mouse

    Instead there is just one option: 'mouse' which turns on mouse support entirely.


See the mouse-select-pane option in man tmux:

mouse-select-pane [on | off]
If on, tmux captures the mouse and when a window is split into multiple panes the mouse may be used to select the current pane. The mouse click is also passed through to the application as normal.

You can enable this by adding it to your .tmux.conf: set -g mouse-select-pane on

  • 11
    This works great but as I have noticed you loose the ability to select text with mouse or copy mode (prefix Ctrl + [) when you have more than 1 pane. – Patryk Jan 7 '13 at 12:08
  • 8
    Just saw, that, indeed, I lost the ability to select text with the mouse, but found that I still can select it with SHIFT key being pressed. OpenSuse 12.3, GNOME terminal 3.6.1, tmux 1.7. – user72025 Sep 7 '15 at 0:53
  • 2
    This option doesn't seem to be available in v2.1. – DBedrenko Nov 10 '15 at 9:09
  • 1
    was happy with this but it seems to have broken less pagination so.. nope... I'm on tmux 2.0, may try again with the new setup after upgrading to 2.1 – Louis Maddox Dec 4 '15 at 23:51
  • 1
    Yes, if your ssh client emulates xterm terminal. So in most cases the answer is yes: it's possible with Windows/Putty, with macos and linux – nponeccop Nov 25 '17 at 12:15

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.