vim-tmux-clipboard
vim-tmux-clipboard copied to clipboard
Initial line feed being trimmed during paste in neovim
Not sure whether tmux or neovim behavior changed, but one of them broke vim-tmux-clipboard when they were updated. When doing a multiple line selection then pasting, it will paste into the current line rather than the next line. I fixed it by changing the "autocmd TextYankPost" line to add another "\n" as the first parameter of the "join" call.
Unfortunately, tmux buffers (tmux list-buffer
) cannot distinguish between characterwise text and linewise text (:help getregtype()
)
I don't know how to fix this behavior.
For what it's worth, this behavior currently breaks entirely inside neovim as well, with no tmux involved - simply doing yy
on a line and then p
pastes without the linefeed.
Looking at the code, I don't understand why that would be. If I figure it out, I'll send a PR.
The fix suggested by @erahhal works for me.