News for hackers. Stuff that matters.
Re:Practical Tmux by YTowOnt9 on Friday May 16, 2014 @06:51PM (#7758368)
> Also how does tmux handle copy/paste with vertical splits ?

It doesn't. If I want to copy some text and it's in a vertical split, well... shit. Time to break out the tmux manual and see if I can figure out how to move this pane above the other one. You know what, screw it. I'll just open a new window entirely, and re-run the test there so I can copy the output.

That's how tmux handles copy/paste with vertical splits.

Re:Practical Tmux by mitchty on Friday May 16, 2014 @07:26PM (#7758493)
Huh copy/paste works fine with vertical splits. Just setup tmux to sync your tmux clipboard with your regular x (or osx if you're into that kind of thing) clipboard.

You mean selecting text with a mouse on a vertical split? If so get tmux upgraded to 1.8+ then prefix-z and you can temporarily zoom the window to full screen.

Your information on tmux is highly out of date.

Also prefix-alt-2 will move to horizontal layout of panes.

Re:Practical Tmux by AjithAntony on Friday May 16, 2014 @07:33PM (#7758509)
Yes, the zoom feature (resize-pane -Z) is a game changer for tmux-to-system-clipboard workflows. Before that I would do the block select with my mouse and then weed out all the extra whitespace as needed later.
Re:Practical Tmux by gaving on Monday May 19, 2014 @03:06AM (#7766082)
Woah. Just tried prefix-alt-[n], totally awesome.

Thanks!

Re:Practical Tmux by keeperofdakeys on Friday May 16, 2014 @10:37PM (#7759062)
Both screen and tmux support a feature you'll really love. Upon hitting ctrl+a/b [, both enter a "copy mode". This allows you to both scroll through the history, and to copy text from a specific pane.
Re:Practical Tmux by dsissitka on Friday May 16, 2014 @07:13PM (#7758447)
Select the pane. C-b z. Copy. C-b z.
Re:Practical Tmux by mnem on Friday May 16, 2014 @07:08PM (#7758426)
I may have misunderstood what you meant, but copy and paste in tmux works in vertical panes just the same as horizontal panes: http://d.pr/i/93p2/wNHyqVFr (copied from the right shell into vim in the left).
Re:Practical Tmux by alec on Friday May 16, 2014 @07:15PM (#7758451)
I think he's asking what happens if you have two panes side-by-side and try to select text in one to copy. Does it also select text from the other one?
Re:Practical Tmux by mitchty on Friday May 16, 2014 @07:28PM (#7758496)
If you use a mouse yeah, but as noted by others, with tmux 1.8+ just prefix-z and you can temporarily zoom that one pane. So there really isn't much reason to complain about this particularly.
Re:Practical Tmux by zhengyi13 on Saturday May 17, 2014 @01:57PM (#7760732)
Not necessarily. At least in Gnome-terminal, Ctrl-Alt-(mouse drag) is a block select that works just fine for copy-paste out of a vertical split.

Or do the rotation thing. Or do the copy-mode thing. More than one way to skin this cat; just depends on which workflow you wish to adopt.

Re:Practical Tmux by pekk on Friday May 16, 2014 @07:52PM (#7758607)
This is much more awkward than just selecting it with the mouse. That's a reason to complain.
Re:Practical Tmux by stormbrew on Friday May 16, 2014 @07:57PM (#7758632)
Well, this is not really the dilemma though. If you don't have vertical splits you don't have this problem, but you also don't have vertical splits. If you have vertical splits you'll solve this problem somehow.
Re:Practical Tmux by madeofpalk on Friday May 16, 2014 @09:59PM (#7758976)
idk what everyone else here is talking about, but I can copy with vertical panes with my mouse just fine http://i.imgur.com/lWxygYn.png
Re:Practical Tmux by thristian on Friday May 16, 2014 @11:49PM (#7759170)
They're talking about using the host terminal's text-selection mode and the system clipboard, rather than tmux's built-in text-selection mode, which does.

I too generally use tmux's built-in text-selection and clipboard when I'm copying from pane to pane, because it's more convenient.

Re:Practical Tmux by mitchty on Saturday May 17, 2014 @12:55AM (#7759268)
The thing is you can synchronize tmux selection with your clipboard, there isn't really a need for tmux to "support" your terminal's view of tmux running within.
Re:Practical Tmux by blueblob on Friday May 16, 2014 @07:30PM (#7758499)
The answer is, it depends. If you copy it with the mouse, you will be copying both sides. If you copy it with your tmux keyboard copy bindings, it will copy just the one side. I don't know the default bindings because I made mine prefix-esc to get to copy mode, vi keys, v to select, y to yank.
Re:Practical Tmux by artursapek on Friday May 16, 2014 @08:22PM (#7758731)
Like others have said, you don't use the mouse to drag & drop and copy. You use your keyboard, the way you would do it in your editor.
Re:Practical Tmux by cgrubb on Friday May 16, 2014 @10:25PM (#7759034)
C-b M-2 to rotate the panes into a horizontal split.

C-b M-1 to rotate the panes back into a vertical split.