Scroll vim window in Tmux copy mode?

Using tmux in copy mode, I cannot get the vim window to scroll. Is it possible? I am trying to copy a huge chunk of text into vim inside one tmux window and paste into another. Thank.

+3
source share
2 answers

I know what you are asking for, and I searched the network to find it. This is what bothered me. This may help you solve your problem:

http://www.vim.org/scripts/script.php?script_id=4488 - vim plugin. It's not so strange how to enter copy mode and scroll in vim instead of tmux history / scroll buffer.

+2
source

try if this will work for your needs:

function! SetTmuxBuffer() range
    execute "!tmux set-buffer '" .join(getline(a:firstline, a:lastline),"\015")."'"
endfunction

command! -range ToTmux <line1>, <line2> call SetTmuxBuffer()

vimrc vim . , , line1-line8 tmux:

:1,8ToTmux

,

:'<,'>ToTmux

tmux, vim.

+1

All Articles