title: python vim tmux linux - copy multiple lines from vim to ipython
body: <p>I am trying to copy a block of text (im in linux debian) from vim to ipython
  I select the block of text "yank", exit vim with ctrl-Z, enter ipython and shift-insert.</p>
  
  <p>However it always only paste the first line of my originaly copied block of text..</p>
  
  <p>Any idea how to paste multi lines?</p>
  
  <p>(Edit by @maxymoo to add a MCVE)</p>
  
  <pre><code>docker run -t -i ubuntu /bin/bash
  apt-get update &amp;&amp; apt-get -y upgrade
  apt-get install python-pip tmux vim
  pip install --upgrade pip
  pip install ipython
  </code></pre>
  
  <p>Now start up a tmux session, <code>C-b %</code> to split pane, start <code>vim</code> and enter the following lines:</p>
  
  <pre><code>print("first line")
  print("second line")
  </code></pre>
  
  <p>Copy it to tmux clipboard with <code>C-b [ C-space &lt;arrow keys to select all&gt; M-w</code></p>
  
  <p>Switch to the other pane with <code>C-b o</code> and start an <code>ipython</code> session.
  Paste the text with <code>C-b ]</code></p>
  
  <p>Output:</p>
  
  <pre><code>In [1]: print("first line")                                                                                                                                    
  first line                                                                                                                                                     
  
  In [2]:                                                                                                                                                        
  </code></pre>
  
  <p>The paste works properly if I force line-continuation mode by using <code>%%time</code> cell magic:</p>
  
  <pre><code>In [3]: %%time
     ...: print("first line")
     ...: print("second line")
     ...:
  first line
  second line
  CPU times: user 0 ns, sys: 0 ns, total: 0 ns
  Wall time: 42.2 us
  </code></pre>