I have two files opened in vim, each in one tmux pane. I would like to copy let's say 10 lines from one file to another.
How can I accomplish this not using the mouse's Copy -> Paste ?
|
I have two files opened in vim, each in one tmux pane. I would like to copy let's say 10 lines from one file to another. How can I accomplish this not using the mouse's |
|||
|
You'll have to use tmux shortcuts. Assuming your tmux command shortcut is the default: Ctrl+b, then:
tmux is quite good at mapping commands to custom keyboard shortcuts. See Ctrl+b,? for the full list of set keyboard shortcuts. |
||||
|
|
|
You could use the system clip board with "*y and "*p instead of the normal y and p. |
|||
|
:w /tmp/lines, then:r /tmp/linesin the other instance). Or, if your Vim knows how to talk to your system clipboard, you could use the+or*registers to avoid the temporary file. – Chris Johnsen Dec 19 '12 at 5:39