15

Is it possible to change tmux shortcuts such that:

  1. ctrl+t opens new window
  2. ctrl+w closes a window
  3. ctrl+tab cycles through a list of windows
  4. other similar shortcuts for splitting horizontally / vertically

I really like its features but am always of the opinion that the less shortcut I have to learn the better.

lolski
  • 16,231
  • 7
  • 34
  • 49

1 Answers1

21

It seems like you want to do this without the command prefix key. If that's correct, add the following commands to your ~/.tmux.conf file:

bind-key -n C-t new-window
bind-key -n C-w kill-window
bind-key -n C-Tab next-window

If you want to use the prefix key, then drop the -n from the above commands.

Joe Casadonte
  • 15,888
  • 11
  • 45
  • 57
  • Excellent! The first two works but for some reason it doesn't detect the ctrl+Tab combination. Is there anything else I need to do? – lolski Sep 19 '13 at 04:45
  • 2
    It seems that I need to have a specific build of xterm that sends the Tab key sequence so that tmux can detect it, according to this [post](http://stackoverflow.com/questions/15470001/bind-ctrltab-and-ctrlshifttab-in-tmux) – lolski Sep 19 '13 at 04:56
  • 2
    @lolski vim-like `Ctrl + H` and `Ctrl + L` to change windows is another option. – Ciro Santilli OurBigBook.com Mar 14 '16 at 21:10