title: Key bindings to send lines of test code with tmux+vim?
body: <p>I am trying to create an ide-like setup with <strong>tmux + vim</strong>. I've seen a lot written about this on the internet, but I've been unable to figure out how to do one critical thing: execute test lines of code. </p>
  
  <p>For example, you may create a tmux session with a vim pane for writing code and a python pane for executing tests, like so: </p>
  
  <pre class="lang-sh prettyprint-override"><code># Create a new Tmux session.
  session="ide"
  tmux start-server
  tmux new-session -d -s $session -n ide
  
  # Split the pane horizontally and launch vim.
  tmux selectp -t 1
  tmux splitw -v -p 50
  tmux selectp -t 1
  tmux send-keys "vim" C-m
  
  # Enter insert mode and start coding...
  tmux send-keys "i"
  tmux send-keys "print('hello world')" C-m
  
  # Select the second pane and launch python.
  tmux selectp -t 2
  tmux send-keys "python" C-m
  
  # Attach to tmux session.
  tmux attach -t ide
  </code></pre>
  
  <p>So, I am aware of how you might use <code>tmux send-keys</code> or tmux's command mode (<code>&lt;prefix&gt; :</code>) to send commands to another pane. However, I'd like to make a vim key binding that copies whatever line I'm on and sends this to the opposite pane in a couple of quick keystrokes.</p>
  
  <p>If you have some magic sauce, I'd be grateful if you could share!</p>