The correct way to copy a text from tmux is to first switch to copy mode, then copy it, then paste it. Then save and source the tmux config.
If you use tmux's copy mode keyboard commands to select some text and then click Ctrl + c or y it'll copy it into the system clipboard. y is the key that tmux-yank uses for copying to the clipboard, the same as vim's “yank” key (which ironically doesn't use the system clipboard by default in vim).
tmux copy-mode is a tmux mode that lets you scroll, search, copy, and jump your way through a pane. There are a ton of keybindings for copy-mode, the main ones you will need to know are / for searching down ? for searching up, n for next item, space for starting a selection, and enter to copy the selection.
I started using tmux to have many panes open at once, but whenever I have a vertical split I find it hard to copy and select lines. How do I make my mouse selection follow line breaks like how my normal bash does?
Also, is there a way to select part of a line and continue selecting the rest of it after I take my finger off the Shift key?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With