tmux provides much better functionality than
most of us that work with tmux have been using
screen for a long time,
and it is more comfortable for us to use
ctrl-a than the default
which is finger-strechy. Thus the first thing I will do after installing
is to rebind the prefix to
ctrl-a. That gives us the most handy way of
swapping last two windows by typing
However, this comes for a price. That is, in a shell environment that
is integrated with
ctrl-a is used to jump the begining of line.
Now that it is mapped as prefix, we can no longer do that.
Surprisingly, the solution is pretty simple. Just use
ctrl-a a to
send the prefix itself, and use
ctrl-a ctrl-a to go to the last window.
Specifically, add these two lines in