5 ms·
I've used tmux for 10 years, and for 10 years I've struggled to copy text in tmux. To my defense, the documentation is impenetrable. That said, so looking forw
by rekoros 6y ago
I've used tmux for 10 years, and for 10 years I've struggled to copy text in tmux. To my defense, the documentation is impenetrable.
That said, so looking forward to copying text in tmux going forward. The instructions in the OP didn't work for me, but I found two other posts - one from 2013, one from 2016, the combination of which worked. Not only can I copy text to a tmux buffer now, but it automatically goes to the system clipboard. This feels like overcoming a major disability.
- 0xEFF 6y agoYou may already know, but in case not, you can also use this tmux feature from your editor. For example in vim :w !tmux load-buffer - Writes whatever you have selected in vim into the tmux buffer through standard in. Elsewhere you can paste like pbpaste. :r !tmux save-buffer - The save-buffer command is’t the most intuitive name, but it’s saving to a file, stdout in this case.
- simias 6y agotmux's keyboard copy is rather intuitive... If you know emacs.
- nobleach 6y agoThe crazy thing there is that it uses Vim visual mode for selecting text `v` or `V`.
- russellendicott 6y agoI've been using tmux buffers for quite some time now but what always throws a wrench in my plans is when using tmux in SSH sessions there are always gotchas when getting access to my host's clipboard buffer depending on the platform (windows/mac/nix). The whole reason I dev remotely through SSH is so it doesn't matter what platform I'm coming from. For example, from Windows these days I'm having to vim yank to file ~/clipboard and then I have a Windows keyboard shortcut to pscp that file locally && notepad file. Hacky, yes, but the muscle memory is there now so meh. But that's just the flavor of the month this month...
- res0nat0r 6y agoI'm not sure why everyone goes so crazy over tmux, I've been using screen for 20 years now and it's generally installed everywhere by default, even on remote servers I don't have root on, so I don't have any real reason to switch. 99% of both of these things both do what I need daily, so I usually don't use tmux unless screen doesn't happen to be available for some reason and tmux does. But more power to the devs for wanting to rewrite screen to be more modern with some additional features.
- irateswami 6y agoScreen is incredibly inefficient though.
- res0nat0r 6y agoThat's always been the argument, but it's always been perfectly fine for me. I'm using it to run long running background tasks, or just let me switch between multiple remote hosts patching / debugging them, not to render some kind of HD game.
- mprovost 6y agoAnd yet... I've been using screen for 20 years and it never seemed inefficient, even when running on a 180MHz Pentium Pro. These days I have to believe whatever it's doing must be pretty minor compared to the overall system performance, but I'd be interested in hearing what it does so inefficiently.
- guenthert 6y agoIt worked fine in the early nineties on a '386. I can't tell how efficient it is, because I never had reason to worry about it.
- gbraad 6y agoStill using screen to easily run a background which I can occasionally check up on. Never (perhaps once a year) seem to do this with tmux.
- AzzieElbab 6y agoI am by no means a tmux expert but I think I discovered copy paste-yank paste by accident because I use vi keys. Also, tmux on Mac feels weird compared to Linux terminal