filescrolltmuxpane

tmux how to scroll two pane like vim scrollbind


How to scroll two pane side by side like vim.

In vim I can use scrollbind to scroll two file side by side.

For example: Open the first file with vim LICENSE

Open another file with :set vsplit LICENSE

Bind the first file with :set scrollbind, then Ctrl+W switch to another file and bind it with :set scrollbind (Unbind is :set noscrollbind)

Then I can scroll the two file with up and down key.


Solution

  • Well it does not limit to scroll, but you can use :setw synchronize-panes in tmux.

    http://man.openbsd.org/OpenBSD-current/man1/tmux.1#synchronize-panes

    UPDATE: THIS SOLUTION DOES NOT WORK FOR SCROLLING ANYMORE!