12

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?

3 Answers 3

25

You can use the "zoom pane" feature by pressing prefix + z. The currently active pane will become full screen (press prefix + z to toggle) and now you can do mouse selection as if there are no splits.

Sign up to request clarification or add additional context in comments.

2 Comments

Wow! Lotta comments here.... Whiskey-Tango-Foxtrot......For people that are new to TMux and not that experienced with the tmux configs.... this is BY FAR THE BEST ANSWER!!!
Saved my day! Shortcut of the day.
3

It looks like an unresolved (yet closed) issue, see Don't yank newlines in line-wrapped commands #530.

To move this forward, I would suggest:

  • Opening a new issue on GitHub
  • Ask for the ungarbled patch proposed here
  • Report back to the maintainers if that solves the problem.

Comments

2

there are configurations to enable mouse actions:

set -g mouse-select-pane on set -g mouse-resize-pane on #resize panel with mouse set -g mouse-select-window on #select window with mouse setw -g mode-mouse on #Make mouse useful in copy mode 

try adding them in your tmux.conf

1 Comment

I already have those in my tmux.conf, but they dont allow you to use the mouse to copy a line following a line break. Using the mouse will allow me to select a rectangular block, which don't encompass the text that's outside the rectangle, but part of the same line.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.