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.
However it always only paste the first line of my originaly copied block of text..
Any idea how to paste multi lines?
(Edit by @maxymoo to add a MCVE)
docker run -t -i ubuntu /bin/bash apt-get update && apt-get -y upgrade apt-get install python-pip tmux vim pip install --upgrade pip pip install ipython Now start up a tmux session, C-b % to split pane, start vim and enter the following lines:
print("first line") print("second line") Copy it to tmux clipboard with C-b [ C-space <arrow keys to select all> M-w
Switch to the other pane with C-b o and start an ipython session. Paste the text with C-b ]
Output:
In [1]: print("first line") first line In [2]: The paste works properly if I force line-continuation mode by using %%time cell magic:
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