Thursday, July 28, 2011

tmux repeating keys

When upgrading from tmux 1.1 to 1.5 I found a few key bindings changed slightly. In particular, the arrow keys used to switch panes now repeat.

I often use the sequence C-b Down immediately followed by Up and then Enter to re-run a unit test. With 1.5 I was doing this too quickly (tmux's repeat-time is 500ms by default) so I was switched back to my previous pane. To fix this I simply added the arrow keys to my .tmux.conf without the -r option:

bind-key Up select-pane -U
bind-key Down select-pane -D
bind-key Left select-pane -L
bind-key Right select-pane -R

Tuesday, July 26, 2011

Invalid tmux term causes irssi issues

Today I finally switched my long-running IRC screen session to tmux. I rarely disconnect so I was simply waiting for a "good" time.

After a few minutes I noticed that my irssi scrollback was misbehaving; only half of my window would redraw when I pressed PgUp of PgDn.

I had manually set "TERM=xterm" in my bashrc; however, tmux advises only using "screen" or "screen-256color" as the term. I have no idea why I had specified term within my bashrc; removing the line and restarting tmux corrected the issue.