Posts Tagged ‘tmux’
I recently discovered tmux. It’s actually been around for about four years, but as I’ve been reasonably happy with GNU screen, I’d never thought to look elsewhere. tmux piqued my curiosity and as there were packages readily available in EPEL, I installed it and have been using it most of the day.
The screen keystrokes are firmly stuck in my brain, and of course there’s the chance that I might have to use screen again on other systems, so I’d rather stick with them vs. re-learning tmux’s C-b based command structure. After some tinkering, I found that the following in my
~/.tmux.conf file gets me most of the way there:
set-option -g prefix C-a bind-key p previous-window bind-key C-p previous-window bind-key Space next-window bind-key C-Space next-window unbind-key C-b # Makes CTRL-A A work like in screen (jumps to beginning of line) bind-key a send-keys C-a
In a nutshell, this sets the command key sequence to C-a (CTRL-A) and sets the ‘p’ and spacebar keys to cycle through my windows. As I often find myself keeping the CTRL key pressed down as I hit the p or spacebar, I also mapped things so the windows will shift whether or not I leave CTRL pressed or not.
I’ve never been a screen power user, but anything with a smaller memory footprint is a win for me as I primarily have been using screen on a low-memory Linode system.