terminaltmux

scroll tmux history like a pager


How can I scroll tmux with all these keys:

<C-y>  one line up
<C-e>  one line down
<C-u>  half a page up
<C-d>  half a page down
<C-b>  page up
<C-f>  page down
k      one line up
j      one line down
/      search forward
?      search back
n      next search result
N      previous search result

And with number-prepended versions of these, e.g. 10k for 10 lines up.

These controls work in vi and most pagers, like more and less.

How can I scroll tmux history with these familiar controls?


Solution

  • All of these keys are already supported by default by tmux's vi keybindings. Make sure copy mode is using vi keys by adding to your ~/.tmux.conf a line like

    set-window-option -g mode-keys vi