tmux to develop, with two panes: one to edit the code, and one to compile it.
I need to switch pane very often to launch the compile command (say "
How can I bind a key (say "Ctrl+B C") to launch that specific command in the other pane (or without any pane at all)?
C-b c already has a standard binding which it might be wise to leave unchanged. Choosing another character, eg C-b C you can setup a binding in your
~/.tmux.conf file as follows:
bind C send-keys -t.- 'mvn install' Enter
-t.- means "the other pane".
Enter stands for the key of that name, i.e. the newline at the end of the command.