Tuesday, April 22, 2014

tmux + bash - C-a to move to the start of command line.

Recently I compiled tmux on the development server when I got tired of trying to find a good terminal multiplexer which I could use confortably.

Don't get me wrong ConEmu is a terminal as good as it gets on Windows.

I've tried several of them following are a few of them
  • Putty Connection Manager
  • Poderosa - Development on this one seems to have been stalled quite a while back.
  • mrxvt - Compiled on Cygwin, this was working fine and probably the longest one I used. But it doesn't support Unicode and there's no plan of supporting it as well. If you just want the multiple TABS with a single window, this should be the choice.
For one reason or the other they fell short. None of the above do more than giving you a TABBED interface like "gnome-terminal" or KDE "konsole".

Then I found ConEmu and it's simply great! Although I could not find a key to set CTRL-Arrow to move from one tab to another.

Bugged me a lot! And hence compiling "tmux" on the Linux server so that I can use it.

"tmux" is great although comes with a default Key Prefix C-b. GNU screen uses CTRL-a as a Prefix key.

If you are like me, I use C-a a lot to move about on the command prompt. Once you bind C-a in ~/.tmux.conf as prefix to "tmux" commands you can't seem to use it.

So if I define the following in ~/.tmux.conf 

unbind C-b
set -g prefix C-a    # I loose the ability to use C-a to move to the start of the line. 

How to use C-a mentions the following tmux configuration to be able to use familiar shortcut.

bind a send-prefix




And now one can use "C-a a"  to do the same trick.

Just in case you want to see what tmux looks like? Here's the screenshot.

tmux running under ConEmu!



No comments: