Reputation: 3691
^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)
Upvotes: 29
Views: 18898
Reputation: 1537
This depends on the binding of "mode-keys". If you have set-option -g mode-keys emacs
in your ~/.tmux.conf file (actually, this should be the default), then you can go to the beginning and the end of the buffer using corresponding emacs keys:
Similarly, going to the end is achieved by M->
If instead you prefer vi keybindings, you can put set-option -g mode-keys vi
in your ~/.tmux.conf file, and then you have:
gg
, go to the bottom using G
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.
Upvotes: 25
Reputation: 13942
You can use like:
bind-key -T copy-mode C-S-Home send -X history-top # Ctrl+Shift+Home
bind-key -T copy-mode C-S-End send -X history-bottom # Ctrl+Shift+End
This way when you are in copy mode Ctrl+Shift+Home will take you to the beginning of scroll buffer and Ctrl+Shift+End will take you to the end of scroll buffer.
Upvotes: 0