I use Tmux to open my terminals . When I copy and paste in Tmux, new lines are being attached at the start of the lines. For example if I copy :
Line1 to be copied. Line2 to be copied. Line3 to be copied. And if I paste the above text. It would become
Line1 to be copied. Line2 to be copied. Line3 to be copied. I use it from mac. I select the text to be copied while pressing "alt" key and then paste it. Any suggestions on how to avoid the spaces at the start?
Note: A few more details about the environment. I have a custom tmux.conf file. Following are a few setting I use in my tmux conf.
# more settings to make copy-mode more vim-like unbind [ bind Escape copy-mode unbind p bind p paste-buffer bind -t vi-copy 'v' begin-selection bind -t vi-copy 'y' copy-selection bind -t vi-copy 'z' copy-pipe "reattach-to-user-namespace pbcopy" # Buffers to/from Mac clipboard, yay tmux book from pragprog bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer")