If I set key bind of C-b to c-a in tmux how can I move the cursor to the beginning of the line?

mko picture mko · Jul 19, 2012 · Viewed 64k times · Source

I just move from GNU screen to tmux, in screen when I hit C-a, then type a again can take me to the beginning of the line, I wonder if I stick with C-a in tmux how can I work around this?

Answer

chepner picture chepner · Jul 19, 2012

As you know, C-b is the default prefix in tmux. C-b C-b is used to send an actual C-b character to the terminal. If you switch the prefix to C-a, you just need to rebind some keys to update which one sends the send-prefix command.

For your .tmux.conf:

# You probably already put this in
set prefix C-a

unbind-key C-b
bind-key C-a send-prefix