Thanks to Art of Vim, Vimcasts, and Thoughtbot’s Tmux evangelism I have become a pretty devoted convert to using Vim and tmux. However, I’m running into some problems with copying and pasting that are bothering me.
When I’m copying command output from tmux, the process is easy enough with the reattach-to-user-namespace command. Pasting from the system clipboard into vim is also straightforward (I like to use vim-unimpaired’s paste-mode shortcuts). The scenario that seems like it doesn’t have a good Googleable solution is copying text from within Vim while in a Tmux session.
I have tried using or disabling
set clipboard=unnamed, yanking to the quoteplus or quotestar register, but everything I do works as expected without tmux but fails with tmux running. My tmux configuration (https://github.com/geoffharcourt/dotfiles) is mostly based on Thoughtbot’s dotfiles, so I feel like I must be missing something. Using copy-mode in tmux to copy text from vim results in line numbers and messiness. Is there a straightforward way to get text out of vim into the system clipboard while running tmux?