Copying and pasting between tmux panes containing vim instances over SSH in Terminal.app
A better way to do it is save the selection in a temporary file and use tmux load-buffer command to load it into the paste buffer, and then C-b ] to paste.

Otherwise you may have problems with long text lines that don't fit into the screen.
Also, tabs might not be preserved and long lines may be broken down.

I have to mention another (easier) way to do it without any additional files.

There's a mod for tmux adding more flexible scripting capabilities: http://ershov.github.io/tmux/ (I'm the author)

It allows you to copy and paste without using any temporary files:


Copy selection in vim
In vim, type :!tmux tcl pbcopy "^R%" this will put the vim's paste buffer into tmux's one
In tmux, in another pane use ^B ] to paste.


You probably want to use :set paste in vim.

And if you do it frequently, you can automate the step 2 and bind it to a keypress in vim.