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 vim: :set showcmd tells me what key I've typed(such as f).

In tmux: after typing Ctrl-b, I stop to think about the next key I need.
Sometimes I forgot I've typed Ctrl-b, so I type it again, it causes problem.

How to change the status-line to let me know I've typed Ctrl-b?

share|improve this question
I don't think there is a way, although it sounds like a good feature to add to tmux. – chepner May 29 '12 at 1:40
up vote 3 down vote accepted

For anyone still looking for a solution, you can know when you have typed the tmux prefix, by adding this to your statusline:


When added to status line, you will get a nice little ^A inside your tmux statusline when you press your prefix. Please, change colour and prefix message accordingly.

You can go fancy, and even toggle all bg colors in your statusline when prefix is typed.

set -g status-left "#{?client_prefix,#[bg=colour2],#[bg=colour1]}#[fg=colour0] #S "
share|improve this answer
Thanks It's a very good solution. – kev Feb 25 '15 at 3:19

As chepner already said here, no options to show currently typed keys or prefixes seem to exist (nor are mentioned in the manpage).

As a workaround, you can press Esc before you use the prefix Ctrl+b again. This way you will discard any previously typed (forgotten) prefixes and avoid accidentally sending multiple Ctrl+b.

share|improve this answer

You must log in to answer this question.

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