+-------------+ | | | 1 | | | |=============| | | | 2 | | | +-------------+
Each tmux split has vim open. I would like to do stuff like yank a line from 1 and paste then into 2 with the vim shortcuts.
tmuxvim
+-------------+ | | | 1 | | | |=============| | | | 2 | | | +-------------+
Each tmux split has vim open. I would like to do stuff like yank a line from 1 and paste then into 2 with the vim shortcuts.
Best Answer
The two vim instances are completely separate from each-other, but there are two possibilities to do this.
If your version of vim was compiled with X clipboard support you can use eg.
"+yy
to yank the current line to the X clipboard register, alternatively puttingset clipboard=unnamed
in yourvimrc
to yank to the clipboard by default. See:help registers
for some information on vim registers.vim has built in support for split windows, so another option is to use the built in splits instead of using tmux window splitting. See
:help windows
or this linux.com article for more information about them.To check for X clipboard support you can run
vim --version
and see if there’s a plus beforexterm_clipboard
in the output. If there’s a minus instead it means that your vim was built without X clipboard support and you’ll either have to get a copy with it, or use the second solution.