Tmux pane keyboard pains

I have one tmux window, two panes: vim above, terminal below. When I type something in vim (like jjj to move down 3 lines), those j’s appear in the terminal window. Same thing happens in the other direction. It’s happened several times, but I have yet to figure out the cause. Any idea as to what’s going on?

Do you have pane selection via mouse turned on? Are you maybe clicking into the terminal pane by accident?

I do have mouse on, Derek, but when this happens, I see activity in both panes; i.e., I’m in the vim page and ‘jjj’ moves the cursor down while the j’s appear in the lower pane. The reverse happens as well: I’m typing in the terminal pane and it wreaks havoc on my vim pane.

Figured this out a while back, so answering here in case anyone else runs into the problem. It’s an issue with the “synchronize-panes” option, which tells tmux to copy your intput into all panes in that window. The hot-key for that is {Ctrl-S}, so it’s easy to accidentally type {Ctrl-A}{Ctrl-S} when you’re in a hurry… at least that’s what happened to me;

If that happens, simply type another {Ctrl-A}{Ctrl-S} to turn it off. You can also type:

{Ctrel-A}:set-window-option synchronize-panes off

All of this assumes you’ve set your tmux prefix-key to {Ctrl-A}