This is the way I made it work, and the reasons why I think it is better than the default way.
To try it out, put all the code sections in ~/.tmux.conf
.
Step 1. Change the prefix key so you won't have to reach one bit. 'B' is seemingly a close key, but it is in the middle of the two index fingers (at 'F' and 'J', respectively). Because that shortcut is essential in tmux, C-j is much better as it involves zero hand movement (apart from hitting the key).
set -g prefix C-j
unbind C-b
bind C-j send-prefix
Step 2. 'S' (to enter copy-mode) is: 1) close (same reason as above), 2) involves the other hand (compare: the 1-2 in boxing, or the ls
command to view files in a directory), and 3) could be thought of as mnemonic for "scroll" (although the copy-mode isn't just about scrolling).
bind s copy-mode
Step 3. The last part, the actual scrolling. 'P' and 'N' are familiar for this purpose to the Emacs users. They are close, intuitive ('P' is above 'N' on the keyboard), and mnemonic ("previous" and "next"). If you just did some scrolling in Emacs, and then go to tmux, it makes sense to have those shortcuts.
However, I found that 'I' and 'K' are even better - they are even closer than 'P' and 'N', and intuitive (for the same reason); as for mnemonics - as scrolling is such a common thing to do, mnemonics won't really matter as the shortcuts will soon bypass your brain and enter the muscle memory.
bind -t emacs-copy 'p' scroll-up
bind -t emacs-copy 'n' scroll-down
bind -t emacs-copy 'i' scroll-up
bind -t emacs-copy 'k' scroll-down
2for me you can press f7 for scroll mode and q to quit – JohnMerlino – 2014-07-25T14:56:53.993
8
set -g mode-mouse on
per @chaiyachaiya's answer was the winner for me – Peter Berg – 2016-07-21T19:36:31.2478What overhead are you concerned with?
copy-mode
is the way to view history (and optionally copy stuff out of it). – Chris Johnsen – 2010-11-11T05:48:00.530