简体   繁体   English

tmux 如何滚动两个窗格,如 vim scrollbind

[英]tmux how to scroll two pane like vim scrollbind

How to scroll two pane side by side like vim.如何并排滚动两个窗格,如 vim。

In vim I can use scrollbind to scroll two file side by side.在 vim 中,我可以使用滚动绑定来并排滚动两个文件。

For example: Open the first file with vim LICENSE例如:用vim LICENSE打开第一个文件

Open another file with :set vsplit LICENSE使用: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 )使用:set scrollbind绑定第一个文件,然后Ctrl + W切换到另一个文件并使用:set scrollbind绑定它(取消绑定是:set noscrollbind

Then I can scroll the two file with up and down key.然后我可以用上下键滚动这两个文件。

Well it does not limit to scroll, but you can use :setw synchronize-panes in tmux.好吧,它不限于滚动,但您可以在 tmux 中使用:setw synchronize-panes panes。

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

UPDATE: THIS SOLUTION DOES NOT WORK FOR SCROLLING ANYMORE!更新:此解决方案不再适用于滚动!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM