I have two windows open in tmux(version 2.3). In first tmux window I have a SSH session to server1 and in second tmux window I have a SSH session to server2. In server1 I opened a shell script with vim script.sh and selected a part of the script with mouse and paste it to vim open in server2 with middle mouse button. This caused lot of trailing spaces for each line: However, when I open script.sh in server1 with vim -u NONE script.sh(or with cat script.sh or less script.sh) and select the same text area and past it to vim in server2, then trailing spaces are not added:This made me think that something in my .vimrc causes this behavior. My .vimrc is following:set relativenumberset numbersyntax onset hlsset background=darkset hiddenset listchars=tab:\ ,eol:,trail:highlight NonText guifg=#054a59highlight SpecialKey guifg=#4a4a59set noexpandtabset shiftwidth=4set tabstop=4set softtabstop=4set colorcolumn=81  filetype on  filetype plugin on  filetype indent on  autocmd FileType cpp setlocal ts=8 sts=8 sw=8 noexpandtab  autocmd FileType * set formatoptions-=c formatoptions-=r formatoptions-=o  autocmd BufNewFile,BufReadPost *.bash set filetype=shendifI tried to turn every possible option off(for example set syntax=, set hidden!, set colorcolumn=, etc), but this did not help.I know that copying and pasting from terminal screen is not reliable, but is there some clever workaround for this?
trailing spaces when copying text from vim session in one server to vim session in another server
cut copy paste;ssh
This behavior was caused by colorcolumn option. I started to use quoteplus register.