I just started using tmux, and I really like it, but I need to be able to scroll within the buffers/panes/windows I have open. I don't care if it works with the mouse or not. When I search the tmux man page, I find only two instances of the word "scroll" even showing up, and both have to do with copy mode. Is there a way to scroll without all the overhead of entering copy mode?

link|improve this question
1  
What overhead are you concerned with? copy-mode is the way to view history (and optionally copy stuff out of it). – Chris Johnsen Nov 11 '10 at 5:48
feedback

2 Answers

up vote 54 down vote accepted

Ctrl-b then [ then you can use your normal navigation keys to scroll around (eg. Up Arrow or PgDn). Press q to quit scroll mode.

Alternatively you can press Ctrl-b PgUp to go directly into copy mode and scroll one page up (which is what it sounds like you will want most of the time)

link|improve this answer
5  
I think C-b = is choose-buffer by default. Did you mean C-b [ (which is copy-mode by default)? Also you can also use C-b PageUp to start copy-mode directly on the previous page (very handy when you know what you want to view/copy has already scrolled off the current page). – Chris Johnsen Nov 11 '10 at 5:55
@Chris: In my tmux 0.8 (and its man page), C-b = is scroll-mode. Apparently, newer versions have dropped that. – Dennis Williamson Nov 11 '10 at 11:53
1  
Ahh, that explains it. I think I started with 1.1 which was already after scroll-mode had been subsumed. The OP says ‘only two instances of the word "scroll" [in the man page]’, so the version is probably one without scroll-mode. – Chris Johnsen Nov 11 '10 at 12:22
2  
Correct, my tmux has no scroll-mode. You need to C-b [ to enter copy mode and then use either the emacs or vi key-bindings to scroll around. This seems like a lot of steps just to scroll, but the benefits of tmux still outweigh these annoyances. I'm on a macbook and there is no PageUp key :-\. (Also, how do I make keys with markdown like you did, Dennis?) – chadoh Nov 11 '10 at 17:11
3  
@chadoh: Try these on your Macbook: Home: fn-LeftArrow; End: fn-RightArrow; Page Up: fn-UpArrow; Page Down: fn-DownArrow. To make keycaps: <kbd>Ctrl</kbd> – Dennis Williamson Nov 11 '10 at 18:43
show 1 more comment
feedback

From my .tmux.conf:

# Sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'

This enables native xterm scrolling.

link|improve this answer
6  
Can you explain what this does exactly? – Ivo Oct 31 '11 at 6:25
I don't know what it does, but it is pure genius. Finally, tmux scrolling works, yay! – oneself Nov 28 '11 at 21:26
Maybe this helps to explain it? blogs.oracle.com/samf/entry/smcup_rmcup_hate – Denilson Sá Dec 26 '11 at 14:41
This doesn't work for me on OS X... – Nick Apr 17 at 13:56
1  
Solution: gist.github.com/1297707 – Nick Apr 17 at 15:25
feedback

Your Answer

 
or
required, but never shown

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