When I try to copy and paste between tmux sessions or windows, one problem is that I usually have line numbers displayed when using Vim and tmux copies the line numbers:
Is there any way to avoid this?
tmux has the rectangle-toggle command for this. It's not fully explained in the man page; it only appears in the list of commands available during copy mode:
Command vi emacs [...] rectangle-toggle v R
It switches between the line-based selection you demonstrate, and rectangular selection (similar to Vim's blockwise visual mode). In the latter mode, you can start your selection at static and extend down+right without taking in anything to the left (the line numbers).
C-b then :set-window-option -g mode-keys vi then try the C-b [ then v to C-space, it doesn't seem to work. Press Ctrl v and then v, it works like vim block mode.
Demo: https://gitea.balki.me/balki/casts/src/branch/main/tmux_block_select.cast
❯ tmux -V tmux 3.2a
set nonu, or"+y...vim-tmux-navigatordoes; there may be a way to havetmux save-bufer - | somethingthatstripsthenumbersset when invimundertmux(though that may require routing through the os clipboard, or a correspondingtmux set-buffer...)