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?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communitytmux
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.
set nonu
, or"+y
...vim-tmux-navigator
does; there may be a way to havetmux save-bufer - | somethingthatstripsthenumbers
set when invim
undertmux
(though that may require routing through the os clipboard, or a correspondingtmux set-buffer
...)