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

I use zshell and am trying out tmux. In shell if I hit control-R, it fires off bck-i-search and I can begin typing to match commands previously entered. When in tmux, control-R appears to do nothing. I've tried searching around but can't seem to find any reason/solution for this.

share|improve this question
It should work the same way under tmux. Bad config maybe? – ggustafsson Mar 21 '12 at 21:49
Check your /etc/tmux.conf and ~/.tmux.conf . By default C-r is not bind to any command but could be your case. By default C-r works inside tmux shell (bash). – Cougar Mar 22 '12 at 8:33

Do you have an export EDITOR=vi somewhere in your .zshrc anywhere? I had a similar problem to this where C-a C-e and C-r worked fine until I started tmux. Turns out that the inner zsh was picking up on my EDITOR variable and switching keybindings to vi style. Setting up my .zshrc like this solved the problem:

# Use vi as the default editor
export EDITOR=vi

# But still use emacs-style zsh bindings
bindkey -e
share|improve this answer

Wound up adding bindkey '^R' history-incremental-search-backward to my .zshrc file and things are working.

share|improve this answer
I don't know what the interaction is between tmux and zsh that keeps this from working, but your fix worked for me. This has bothered me so much that I've actually been avoiding tmux. I can't thank you enough. THANK YOU! – Justin Force Jul 2 '12 at 0:23

You must log in to answer this question.

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