Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to scroll to beginning/end of scroll buffer in tmux?

Tags:

scroll

tmux

^b+page up/down scrolls up/down one page of scroll buffer, but how do we scroll to beginning ?

like wise with end (besides pressing ^C to kill scrolling)

like image 592
timotheecour Avatar asked May 31 '15 07:05

timotheecour


1 Answers

this depends on the binding of "mode-keys". If you "set-option -g mode-keys emacs" (actually, this is the default settings), then you can go to the beginning and the end of the buffer using corresponding emacs keys.

  1. Enter the copy mode using: ctrl-b + [
  2. Go to the beginning using: Alt + shift + , (or, in emacs' notation: M-<)

Similarly, going to the end is achieved by M->

HOW TO TEST

Please note that configuration in ~/.tmux.conf only takes effect after the tmux server restarts. That is when you kill all sessions and then restart tmux.

In fact, however, there is simpler way to test: just run the following command at command line:

tmux set-option -g mode-keys emacs

I don't think there is a way change only one key. But you do have the choice to

tmux set-option -g mode-keys vi

You should be able move around in copy mode using h j k l etc.

like image 116
Lungang Fang Avatar answered Dec 11 '22 09:12

Lungang Fang