May 14, 2014

Changing starting index of tmux panes

I use the bind key + q combination to quickly switch between tmux panes. I use ctrl + a as the bind key and I found it bit of troublesome to press 0 to switch to the first pane as 0 is at the right side of the keyboard. If the pane index started with 1, it would be much easier to select from 1 onward and won't have to go all the way to zero. Fortunately there is an option for that. Set pane-base-index to 1 and the pane index will start from 1. All that need is the following entry in the ~/.tmux.conf


set -g pane-base-index 1

tmux pane index starting with 1
As you can see from this screen shot, the pane index now starts with 1.