Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the tmux application, how can I map ctrl-a, o (window cycle) to ctrl-a, w ?

share|improve this question

By default, Prefixo is bound to the tmux command select-pane -t :.+.
If you want Prefixw to execute the same command, then do this (e.g. in your .tmux.conf):

bind-key w select-pane -t :.+

Note: This will override the default Prefix+w command (choose-window).

:.+ as a “target-pane” is a way of referring to the next pane in the current window of the current session. See the manpage description of “target-pane”.

By the way, you can inspect your current bindings with the list-keys command (by default, bound to Prefix?, or via Prefix:list-keys, or (e.g.) tmux list-keys | less in a shell). You could use the output of list-keys to determine the original binding of Prefixo.

share|improve this answer

From the tmux command line:

bind w rotate-window

or from the shell

tmux bind w rotate-window
share|improve this answer
This is useful...+1... but not quite what I wanted. This actually switches windows around as well. I would like to remap the ctrl-b,o option that just switches focus without switching the whole split around. – Michael Durrant Jun 21 '12 at 18:07
kinda like ctrl-b [arrow keys] do – Michael Durrant Jun 21 '12 at 18:08
Sorry, "cycle window" make me think of the command bound to C-o instead of o. Like @ChrisJohson posted, you want the 'select-pane' command. – chepner Jun 23 '12 at 17:30
up vote 0 down vote accepted

For now I am using ctrl-a,q,#

ctrl-a I already mapped to ctrl-b

This was the three keys strokes AFTER ctrl are a,q,0 or a,q,1 or a,q,2, etc.

These keys (except 0) are right next to each other on the keyboard for maximum ease of use!

If I could just force tmux to do 1 based counting instead of 0....

share|improve this answer
set -g base-index 1 ..... more tmux tweaks you might like – Jeremy W Jun 21 '12 at 19:54
pane-base-index changes the starting index for panes (base-index is for window indices). – Chris Johnsen Jun 22 '12 at 2:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .