News for hackers. Stuff that matters.
Re:Tmux lets you select and copy text with your keyboard by spicybright on Thursday April 01, 2021 @10:46PM (#26668601)
The fact an article like this exists speaks to how bad the keyboard shortcuts for tools like tmux are. It shouldn't be revolutionary to use basic features of a program.

I'm a huge fan of a command window, where you type words to do a fuzzy search of all the commands in a program.

Sublime text and jetbrains products have it down so well to the point of me not needing to memorize key shortcuts. I just have to remember the first few letters and I'm good to go.

Re:Tmux lets you select and copy text with your keyboard by ianthehenry on Thursday April 01, 2021 @11:06PM (#26668708)
I don't think that's fair: this is not news to anyone who has ever used tmux. This post was written for people who have never tried tmux, but who might want to if they knew about this feature. I think tmux actually has good command discoverability (once you install it) -- prefix + question mark lists all the keybindings, with user-friendly descriptions of what they do.

That said, I agree with your larger point completely -- I love Sublime's command palette, and I love using ivy/counsel for M-x in emacs. It would be even better if tmux had something like that.

Re:Tmux lets you select and copy text with your keyboard by rekoros on Friday April 02, 2021 @08:05AM (#26670736)
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.

Re:Tmux lets you select and copy text with your keyboard by res0nat0r on Friday April 02, 2021 @11:02AM (#26671973)
I'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.
Re:Tmux lets you select and copy text with your keyboard by irateswami on Friday April 02, 2021 @11:06AM (#26672002)
Screen is incredibly inefficient though.
Re:Tmux lets you select and copy text with your keyboard by res0nat0r on Friday April 02, 2021 @11:55AM (#26672539)
That'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.
Re:Tmux lets you select and copy text with your keyboard by fl0wenol on Friday April 02, 2021 @01:04PM (#26673350)
Genuinely curious: In what way?

Also: How is tmux about serial ports/USB->serial adapters?

Re:Tmux lets you select and copy text with your keyboard by mprovost on Friday April 02, 2021 @12:22PM (#26672853)
And 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.
Re:Tmux lets you select and copy text with your keyboard by guenthert on Friday April 02, 2021 @01:28PM (#26673628)
It 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.
Re:Tmux lets you select and copy text with your keyboard by gbraad on Friday April 02, 2021 @12:28PM (#26672922)
Still 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.
Re:Tmux lets you select and copy text with your keyboard by 0xEFF on Friday April 02, 2021 @10:08AM (#26671539)
You 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.
Re:Tmux lets you select and copy text with your keyboard by russellendicott on Friday April 02, 2021 @10:55AM (#26671915)
I'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...

Re:Tmux lets you select and copy text with your keyboard by AzzieElbab on Friday April 02, 2021 @06:59PM (#26676805)
I 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
Re:Tmux lets you select and copy text with your keyboard by simias on Friday April 02, 2021 @10:25AM (#26671668)
tmux's keyboard copy is rather intuitive... If you know emacs.
Re:Tmux lets you select and copy text with your keyboard by nobleach on Friday April 02, 2021 @12:46PM (#26673123)
The crazy thing there is that it uses Vim visual mode for selecting text `v` or `V`.
Re:Tmux lets you select and copy text with your keyboard by oblio on Friday April 02, 2021 @02:17AM (#26669376)
I've been using tmux for a while and I didn't know about this.

Just because an app has some features doesn't mean that everyone knows about them. In fact the opposite is true, most features are never discovered and even fewer are used, even "obvious" ones.

Re:Tmux lets you select and copy text with your keyboard by corndoge on Thursday April 01, 2021 @11:25PM (#26668774)
Been using tmux for many years and did not know it could copy text
Re:Tmux lets you select and copy text with your keyboard by ianthehenry on Thursday April 01, 2021 @11:31PM (#26668798)
Well, I stand corrected then. More discoverability would definitely make the world a better place. :)
Re:Tmux lets you select and copy text with your keyboard by minusf on Friday April 02, 2021 @06:16AM (#26670290)
it's called reading the docs...

some tools are so feature packed there's no way to discover/know everything and that's fine.

i didn't discover tmux could copy text until i got really annoyed by selecting with the mouse...

not annoyed = not discovered :)

Re:Tmux lets you select and copy text with your keyboard by d33 on Friday April 02, 2021 @08:05AM (#26670737)
Docs aren't a replacement for a good UX.

Tmux comes from the times when this attitude was okay, but I feel that the standard now is raised and if the UI could give some feedback/help that doesn't require reading through all of the documentation, it's definitely something that should be prioritized.

Anti-example - help screens. Press ctr+b, then ?. Compare this to screen's ctrl+a, then ?. Both are quite terrible, but tmux definitely leaves users more disoriented while this isn't something that couldn't be avoided.

A simple message saying "you are in XYZ mode, type :help xyz-mode to get help" could go a long way. The RTFM philosophy combined with a wall of single-file manpage with no tutorial is something that I really wish died already.

Re:Tmux lets you select and copy text with your keyboard by soraminazuki on Friday April 02, 2021 @12:37PM (#26673027)
> Docs aren't a replacement for a good UX.

Tmux is a command line application, and the man page is a well understood convention for anyone operating on the command line. I don't think it's unfair to fault tmux for poor discoverability because its manual is informative, easy to read, and fits in a single man page. It's also unnecessary to "read through all of the documentation" before using tmux, spending 3 minutes to read the first two sections would suffice.

> Press ctr+b, then ?. Compare this to screen's ctrl+a, then ?. Both are quite terrible, but tmux definitely leaves users more disoriented.

There's no difference between the two. People who refuse to read the manual or any of the abundant online tutorials won't be able to deduce either.

> A simple message saying "you are in XYZ mode, type :help xyz-mode to get help" could go a long way.

I'd prefer applications like tmux not stand out more than necessary. Displaying that sort of message every time I press some key can get annoying pretty fast.

Re:Tmux lets you select and copy text with your keyboard by minusf on Friday April 02, 2021 @09:14PM (#26677584)
tmux has bad UX? ever used this unknown program called `git`?

ultimately a terminal multiplexer (and an editor) are complicated tools with steep learning curves, that's the price of the power that they enable. it's everybody's own choice how deep they want to get into it and how much time it saves for them.

do you have trouble finding tutorials for tmux? youtube is full of them. and there can be so many because the docs are excellent...

Re:Tmux lets you select and copy text with your keyboard by phone8675309 on Friday April 02, 2021 @10:20AM (#26671620)
> The RTFM philosophy combined with a wall of single-file manpage with no tutorial is something that I really wish died already.

With respect: what do you do for the tools you use to help this situation? The software is open source and accepts patches, and I'm sure they'd love to accept a patch that adds user-friendly documentation to the tool.

Re:Tmux lets you select and copy text with your keyboard by d33 on Friday April 02, 2021 @12:37PM (#26673021)
It sounds like a loaded question, but a perfectly valid one :) If you're asking whether I actually change the tools I complain about then the answer is "no".

The reason is that if you hate how, say, coreutils works and have a strong vision of how it should be restructured, it will boil down to being off-putting to the mainteiners at best and - at worst - becoming a rewrite anyway. This is why I see my role as more of a propagator of tools that want to dethrone the current defaults: I look out for new exciting projects that have wildly better ergonomics than what's most common and I recommend them to my friends. And given that I'm running a hackerspace in my city, I have a bit of a reach so I think that this strategy might be a net good. I also try to share knowledge on how to code and keep in touch with FLOSS communities, so while I might not be contributing code directly, I (hopefully) end up bringing contributors anyway.

And while we're talking about spreading the word when a project has good ergonomics, here are some examples I personally love:

1. "glances" - a tool that combines a couple of tools like top, iftop, iotop and various other monitoring programs into one CLI dashboard. It's a bit chunky, but its functionality justifies it. 2. "fd" (cargo install fd-find) - a simpler version of "find". instead of crazy "find -iname 'something" you can just do "fd something". It's also faster. 3. "ripgrep" - like fd, but for grep. Defaults to recursive grep and skips .gitignore, so you can just type "rg variableName" and see all occurrences of it within files in your directory tree.

But you're right, I love to complain and quite frankly, in many cases I'm disappointed by priorities some projects choose in terms of ergonomics. Disappointed up to the point that I gave up sending patches - or even filing issues (example: GitLab). Perhaps a solution to the problem would be to have something like a GitHub badge signalling "UX feedback is welcome" or "RTFM", depending on one's design philosophy? That would help developers reach their target audience, regardless of which side of the argument they prefer.

Re:Tmux lets you select and copy text with your keyboard by square_usual on Friday April 02, 2021 @01:00AM (#26669123)
Seconded. Used tmux for basic ops stuff for ~2 years, didn't know about copying.
Re:Tmux lets you select and copy text with your keyboard by chaps on Friday April 02, 2021 @01:28AM (#26669208)
Been using it for about five, and honestly I stopped using this in my workflows a long time ago. My workflow now is to ctrl-a+z to maximize the pane, highlight (with the mouse) and hit ctrl-insert to copy and ctrl-shift-insert to paste, then ctrl-a+z to restore the pane. It's still a bit of a pane, but it's deeply ingrained enough into my muscle memory that it's smooth.

But... sublime is my text editor for notes and SQL. Everything else text related is in a terminal with vim mode enabled universally. Not sure why SQL is so annoying with vim..

Re:Tmux lets you select and copy text with your keyboard by boogies on Friday April 02, 2021 @09:54AM (#26671418)
If you `set-option mouse on`, tmux will let you use copy-mode just by clicking and dragging (intelligently within panes, negating the need to resize-pane -Z). But TBH I often do almost the same thing (but Xorg does its part of the copy-pasta without forcing any Emacs-esque three-finger keyboard chording, thank goodness), selecting text is the only thing I ever use the mouse for in the terminal (except rare scrolling, especially overflowed weechat bars), so I keep tmux’s mouse support off.
Re:Tmux lets you select and copy text with your keyboard by chaps on Friday April 02, 2021 @05:39PM (#26676269)
Ah yeah, I use that configuration option (love it), but I think the issue is that highlighting text doesn't stay highlighted unless I hold shift -- which shifts the mouse functionality to the terminal emulator. Maybe there's a setting to get around that, but it hasn't been a big enough deal to really try and figure out.
Re:Tmux lets you select and copy text with your keyboard by disqard on Friday April 02, 2021 @02:32AM (#26669426)
> It's still a bit of a pane

I see what you did there :)

Re:Tmux lets you select and copy text with your keyboard by rgoulter on Friday April 02, 2021 @12:16AM (#26668978)
One feature to improve the discoverability of sequences of keypresses/chords is a which-key style UI. e.g. a panel will show the available set of next inputs which can be handled, and what their command is. https://github.com/justbur/emacs-which-key#more-examples
Re:Tmux lets you select and copy text with your keyboard by EamonnMR on Thursday April 01, 2021 @11:48PM (#26668865)
I used Tmux as my tiling window manager for a while and I didn't know this.
Re:Tmux lets you select and copy text with your keyboard by iopq on Friday April 02, 2021 @05:19AM (#26670079)
I've used it, but I use it like a retard so it's useful to me.
Re:Tmux lets you select and copy text with your keyboard by blueblob on Friday April 02, 2021 @12:01PM (#26672607)
I agree with the command discoverability. Not only does prefix+? show you the commands, it is also searchable, and if you use vi-mode, it uses the same search commands.
Re:Tmux lets you select and copy text with your keyboard by tomphoolery on Friday April 02, 2021 @10:21AM (#26671633)
fzf could in theory be used for this
Re:Tmux lets you select and copy text with your keyboard by lucideer on Friday April 02, 2021 @07:42AM (#26670617)
tmux user. This is news to me.
Re:Tmux lets you select and copy text with your keyboard by Galanwe on Thursday April 01, 2021 @11:12PM (#26668729)
> Sublime text and jetbrains products have it down so well to the point of me not needing to memorize key shortcuts.

Right, but you dont run things _inside_ sublime text. Keep in mind tmux has to play well with hundreds of existing shortcuts that people expect to work.

When you are attached to a tmux, you don't want to override the shortcuts of something you may run inside the tmux.

All the terminal shortcuts are expected to work (Ctrl-E, Ctrl-Arrow, Ctrl-A, Ctrl-E, Ctrl-E, Ctrl-Q, etc..). All main program shortcuts are expected to work (vim, emacs, etc) And of course not desirable to override screen shortcuts.

Re:Tmux lets you select and copy text with your keyboard by wahern on Thursday April 01, 2021 @11:30PM (#26668795)
I never used GNU screen as its command prefix, ctrl-k, conflicted w/ the command prefix for my preferred editor, JOE, and I was always too lazy to reconfigure the bindings. tmux uses ctrl-b by default, which smoothed the way to using tmux. I'm still too lazy to learn any tmux commands; the only one I know off-hand is ctrl-b-d, for detaching, which is sufficient for my needs. Scrolling is annoying in tmux sessions because I don't remember the commands, but I compensate by avoiding tmux when I might need the scroll buffer or by tee'ing output to temporary files.
Re:Tmux lets you select and copy text with your keyboard by devin on Friday April 02, 2021 @03:55AM (#26669759)
I think you mean ctrl-a for screen’s default leader.

ctrl-b ? is helpful if you can’t remember the hot keys.

Re:Tmux lets you select and copy text with your keyboard by pwg on Thursday April 01, 2021 @11:37PM (#26668825)
I just moved screen's command prefix to ctrl-j, for the same reason, it did not conflict with Joe (in JStar mode) command keys.

That reconfiguration occurred very soon after I was introduced to screen, circa. 1993 or thereabouts.

Re:Tmux lets you select and copy text with your keyboard by usr1106 on Friday April 02, 2021 @02:55AM (#26669503)
I'm suprised anybody uses JOE as their preferred editor. I have never met anybody even mentioning it, but obviously people have different backgrounds.

I've used Unix in the 1980s the first time and learned that whatever your preferred editor is, you need to know vi, because vi is always installed. That has been true in my experience with a single exception. In a recent embedded Linux I used they had only nano available.

So what is the story behind JOE and what is good about it?

Re:Tmux lets you select and copy text with your keyboard by Kliment on Friday April 02, 2021 @07:16AM (#26670520)
I used JOE for a long time back in the day and I remember it fondly for plastering its documentation right onto the screen so you didn't have to look stuff up, as a beginner. This sounds embarrassing but I suspect others have had the same problem so here goes:

Back in the day (in the 90s) I was just starting out with linux, and had to install slackware from floppies I carried to school and to the library, a handful of packages at a time. I didn't have documentation packages installed yet, but I did have some howtos. So I had to edit some files, and I tried the "standard" editors - vi and emacs. I didn't know how to quit vi or emacs. I'd end up trapped in them, and eventually figured out I could Ctrl-Z and kill the process for vi. This didn't work on emacs so I'd end up switching to a second virtual terminal and then kill the emacs process. I had no idea what I was doing, and being unable to get out of a program and get back into a safe known state was quite traumatic to teenage me just getting into unixy stuff. JOE was there for me. It did what I needed it to do, it told me how to operate it, and I never once got stuck in it. Out of gratitude, I used it exclusively for years. It's zero bullshit, it edits files, it doesn't let you down.

Re:Tmux lets you select and copy text with your keyboard by chx on Friday April 02, 2021 @03:10AM (#26669566)
wordstar. If you are used to wordstar, joe is a blessing.

There are a few greybeards and I mean that literally who swear on WordStar, GRRM most famous of them but Robert J. Sawyer does too. So it's not unreasonable to think there are other, less famous people who still use it? and want to use an editor with the familiar keybindings.

Not me. I am completely up to date with software and my favorite word processor is WordPerfect 5.1.

Re:Tmux lets you select and copy text with your keyboard by liotier on Friday April 02, 2021 @03:33AM (#26669663)
Also, Turbo Pascal 3.x's editor took Wordstar shortcuts. Only years later high school me only learnt that those strange ctrl-k commands were archeological artifacts...
Re:Tmux lets you select and copy text with your keyboard by chx on Friday April 02, 2021 @05:40AM (#26670159)
I am ashamed but I forgot the Turbo Pascal hotkeys :( it's been ... a long , long time since I opened TURBO.COM. Some of these do fall out of memory. I once knew the full 300+ opcode list for the Z80 so I could read machine code and disassemble it in my head, now I only remember C9 being RET :( I blame high school, it was too intensive and it crowded this out of my head.
Re:Tmux lets you select and copy text with your keyboard by nobleach on Friday April 02, 2021 @12:58PM (#26673255)
I launched it a couple of years ago to show my kids what I did as a kid. I had forgotten pretty much every bit of Pascal (and I actually wrote Object Pascal at the end of the 90s!) But all that writeln stuff has left my brain.
Re:Tmux lets you select and copy text with your keyboard by pm215 on Friday April 02, 2021 @05:44AM (#26670175)
I use JOE in its "emacs-ish keybindings" mode (which you get if you run it as 'jmacs') for small "just run an editor in a terminal to edit this config file" jobs. I wanted an editor which was fast to start up, terminal-based, and emacs-like, and this was the one I found 20 years ago. It's always been reliable and it's always been available as a Debian package, so I've never felt a need to look for something else.

For long running edit sessions I use real emacs; I know you can set that up in a client-server arrangement to avoid the startup speed problem, but I never had the effort to investigate that; besides, sometimes you want to edit a file as root, who won't have a long-running emacs.

Re:Tmux lets you select and copy text with your keyboard by opan on Friday April 02, 2021 @08:16AM (#26670794)
For editing a file as root in emacs, you can use TRAMP to connect to your same machine as the root user. I think you also have to toggle a read-only mode afterward.
Re:Tmux lets you select and copy text with your keyboard by michael-ax on Friday April 02, 2021 @06:56AM (#26670443)
try this: emacsclient [-n] -c -a ""
Re:Tmux lets you select and copy text with your keyboard by andrewzah on Friday April 02, 2021 @10:42AM (#26671784)
Piping output to a file is much more preferable in my opinion, but you can access scrollback with ctrl-b [, then j/k for up down and ctrl-u/ctrl-d for jumping up/down.
Re:Tmux lets you select and copy text with your keyboard by sime2009 on Friday April 02, 2021 @04:53AM (#26670012)
The general problem with these kinds of TUI apps isn't the shortcuts but the complete lack of discoverability of the commands and their shortcuts. The expectation that people have to go and the read the documentation and then memorise the shortcuts is ridiculous.

GUIs for decades have demonstrated practical ways of making commands discoverable and also teaching users the keyboard shortcuts. All without having to ask people to RTFM. It is a pity that so many TUI apps haven't learnt the same lessons.

There is a reason why Nano became such a popular default editor for email. The shortcuts are printed at the bottom of the screen(!)

I hope more TUI apps pick up on the idea of the command palette though. It is a fast and keyboard friendly way of improving usability.

Re:Tmux lets you select and copy text with your keyboard by renox on Friday April 02, 2021 @07:21AM (#26670541)
Good GUIs can be discoverable yes, but what about about Windows XP's file explorer shift right-click option (to make reappear 'Open with..'), Windows 10 right click on the 'start' menu? Do you find these things discoverable?

The truth is that being pretty/fashionable matter more than discoverability..

Re:Tmux lets you select and copy text with your keyboard by ropeladder on Friday April 02, 2021 @07:54AM (#26670670)
It's not about being flashy. Those Windows commands are hidden precisely because they are for power users and Microsoft presumably thinks that average users don't want or need them. Which is a whole different can of worms.
Re:Tmux lets you select and copy text with your keyboard by renox on Friday April 02, 2021 @09:16AM (#26671159)
These commands should be also provided behind an 'advanced' submenu which would make them both discoverable AND not used by default by normal users.
Re:Tmux lets you select and copy text with your keyboard by spookthesunset on Friday April 02, 2021 @12:21PM (#26672840)
If tmux or screen had two rows worth of UX like nano does... it’d use them way more. I see the value of those programs but they are so not core to my workflow that I can never bother to remember the keyboard shortcuts.

Ubuntu has some wrapper for tmux called byobu that does exactly this. It is the only time I really enjoy using this sort of tool.

https://www.byobu.org/

Re:Tmux lets you select and copy text with your keyboard by ufmace on Friday April 02, 2021 @12:29PM (#26672929)
I see it as a kind of trade-off. Good GUI apps do make it much easier for commands to be discoverable to new users of that application. What they sacrifice is generally smooth and rapid keyboard control and more sophisticated composable commands. To make use of that, you pretty much have to be a power user and spend a lot of time drilling keyboard commands and how they can chain together into your head. Once you do that though, you can do a ton of advanced things really fast while hardly even thinking about it.
Re:Tmux lets you select and copy text with your keyboard by G3rn0ti on Friday April 02, 2021 @02:11AM (#26669347)
> The fact an article like this exists speaks to how bad the keyboard shortcuts for tools like tmux are

Well, tmux is not an editor but a terminal multiplexer — its keyboard shortcuts are like this as to make sure they don’t interfere with any editor’s shortcuts running in the terminal.

Re:Tmux lets you select and copy text with your keyboard by gertlex on Friday April 02, 2021 @12:08AM (#26668949)
I learned of byobu several years ago from a coworker. I think of it as (but may be technically incorrect) a wrapper on top of tmux (or optionally screen; behaves the same-ish either way?)

It's hotkeys are... less arcane to remember by virtue of being primarily the F-keys at the top of the keyboard. https://manpages.ubuntu.com/manpages/eoan/en/man1/byobu.1.ht...

Re:Tmux lets you select and copy text with your keyboard by spookthesunset on Friday April 02, 2021 @12:23PM (#26672860)
+1 for this tool. Really makes it obvious what is going on.
Re:Tmux lets you select and copy text with your keyboard by toyota86 on Friday April 02, 2021 @03:30AM (#26669647)
Cringe. The copy and paste buffer is inspired by vi btw. Do you have a problem with vi in addition to tmux?

That is to say, it's dead simple once it's explained to you. The issue is with documentation, not the keyboard shortcuts themselves.

Sublime Text and Jetbrains are also vi-inspired. For where Jetbrains doesn't go far enough there is a vim mode plugin. I would say these are strong indicators of vi's dominance among keyboard shortcut layouts.

Re:Tmux lets you select and copy text with your keyboard by blux on Friday April 02, 2021 @03:38AM (#26669681)
I read the documentation; and the shortcut is explained in the documentation. I've been using it for years already. I think that maybe the problem is partly that people just do not bother to read the documentation, and expect the tool to take them by their hand. Do we expect that from the tools we use? Is that good software?
Re:Tmux lets you select and copy text with your keyboard by alpaca128 on Friday April 02, 2021 @03:42AM (#26669705)
I use Vim every day and love it. And I found tmux' configuration style and controls so confusing that I gave it up completely.

You want Vim-like controls? Use dvtm. It lets you open the content of any terminal in Vim, and from that point you can do anything from selecting/copying text up to saving a snippet in a file with a simple ":w foo".

All that aside, clipboard copy-pasting in Vim is absolutely horrible out of the box.

> Jetbrains are also vi-inspired

Not sure about that. The tab management and window splitting alone feel near unusable to me, because like many other modern apps they are convinced I only want to switch tabs in a seemingly random order(instead of, you know, the order that's literally shown on screen), and none actually have Vim's tabbing where a tab can contain multiple buffers, not the other way around. And guess what, no Vim plugin I know ever touched tabs. Probably because people not using Vim think the UX is all just in some arcane keybindings.

Re:Tmux lets you select and copy text with your keyboard by ufmace on Friday April 02, 2021 @12:00PM (#26672594)
I use Vim for basically everything too. I do find it a bit irritating that most GUI editors do tabs within splits, instead of splits within tabs as Vim does it. I guess the behavior of tabs within splits is baked into most GUI APIs and frameworks so deeply that it would be virtually impossible to change at this point though. Oh well.

I'm more irritated though that Vim has nice keybindings for any sort of changes you might want to make to your tab and split setup. I don't think any of the GUI tools support keyboard commands for any of that. Or at least if they do, I haven't been able to figure out what they are, and am probably honestly too lazy to try to develop muscle memory for how they work.

Re:Tmux lets you select and copy text with your keyboard by alpaca128 on Friday April 02, 2021 @01:33PM (#26673674)
> I guess the behavior of tabs within splits is baked into most GUI APIs and frameworks

Yes, that is probably a common assumption. On the other hand it may not be that hard to just do the tab bar and split containers separately and handwire them together via input events. At least web UIs aren't exactly famous for their adherence to any standard.

So the more likely reason is that most developers just don't have a reason to do it. Because in the end Vim's approach is just more an exception and as far as I know Vim tabs weren't even originally intended for the same purpose - and I can confirm buffer switching within a tab can be pleasingly fast and precise thanks to the tab completion.

Re:Tmux lets you select and copy text with your keyboard by mrighele on Friday April 02, 2021 @03:56AM (#26669771)
> because like many other modern apps they are convinced I only want to switch tabs in a seemingly random order(instead of, you know, the order that's literally shown on screen),

If you mean the behavior of Ctrl-Tab, yes, that's confusing for me too. But you can switch using the order shown on screen though, by using Alt-Left / Alt-Right.

Re:Tmux lets you select and copy text with your keyboard by alpaca128 on Friday April 02, 2021 @06:51AM (#26670417)
> But you can switch using the order shown on screen though, by using Alt-Left / Alt-Right.

Can I also press a button to swap those keybindings back to the old behaviour so I don't have to work against my own muscle memory?

Or better, can I tell it to switch tabs on Spacebar-l and Spacebar-h like I have it setup in Vim? I often wonder if it's too demanding to expect keybinding flexibility that was available decades ago. I get that it's a niche use, but then again it's marketed towards professionals and power users.

Re:Tmux lets you select and copy text with your keyboard by opan on Friday April 02, 2021 @08:20AM (#26670812)
Last I checked, tmux binds are all emacs-like until you change your config. I remember the copying stuff suddenly being easy once I toggled the vi-like keys. Maybe you haven't used an unconfigured tmux in a while.
Re:Tmux lets you select and copy text with your keyboard by ianthehenry on Friday April 02, 2021 @11:39AM (#26672343)
tmux actually tries to be clever here and guess if you're a vim user or not: if your $EDITOR contains the string "vi", you get vi-style keybindings by default. If it doesn't, you get emacs.

But unfortunately it doesn't look at $VISUAL, so... yeah, you usually have to set it explicitly.

Re:Tmux lets you select and copy text with your keyboard by bobmaxup on Friday April 02, 2021 @04:26AM (#26669899)
How is "Jetbrains" vi inspired?
Re:Tmux lets you select and copy text with your keyboard by jalk on Friday April 02, 2021 @07:01AM (#26670467)
The ‘file’ hotkeys in Idea are Norton Commander: F4 edit, F5 copy, F6 move. Iirc early versions of Idea had a two-pane file ‘commander’ built in
Re:Tmux lets you select and copy text with your keyboard by leejoramo on Thursday April 01, 2021 @11:49PM (#26668869)
I first encountered the fuzzy search command bar shortly after I started using Mac OS X 20 years ago when I discovered LaunchBar. This revolutionized my computer usage. Basically bringing the power of CLI to GUI

It took quite a few years fir this to be picked up by SublimeText, but wow that was another huge boost. No longer needing to learn tons of keyboard commands to navigate an application.

I wish an OS would deeply bake this idea in. Apple has done good job with Spotlight for the system level (I still use LaunchBar on my own systems) , but I want this functionality to be shared between System and Apps

Re:Tmux lets you select and copy text with your keyboard by lanstin on Friday April 02, 2021 @01:20AM (#26669189)
The large numbers of keyboard shortcuts is a feature - like learning a piano piece or something, once you have muscle memory you can fly thru the commands. Having to look at anything other than the output of your command, like a suggested completion is slower.
Re:Tmux lets you select and copy text with your keyboard by leejoramo on Friday April 02, 2021 @10:45AM (#26671816)
Lets just say I am very keyboard centric. I have used computers for nearly 40 years. I automate the my systems with extensive Keyboard Maestro and AHK scripts, use multiple layers on my programmable hardware keyboard, LaunchBar or Keypirinha. When editing text I seldom touch the mouse or use the menus. I have mostly made Windows 10 bend to my highly MacOS inspired keyboard focus

On Linux, I mostly restrict myself to the CLI. When I try Linux GUIs, I am frustrated with the lack of keyboard consistency in the GUI, but I have also never given it the months of time it would take to bend the Linux GUI to my way. (I do customize the heck out of the CLI)

Re:Tmux lets you select and copy text with your keyboard by CodeGlitch on Friday April 02, 2021 @03:39AM (#26669689)
This is what Ubuntu tried to achieve with Unity. Even as far as being able to search for GUI commands within individual applications. I thought it worked pretty well and was gutted when they scraped it.
Re:Tmux lets you select and copy text with your keyboard by leejoramo on Friday April 02, 2021 @10:48AM (#26671847)
I only grokked what Unity was about after it was cancelled when I was searching for ways to make the Linux GUI more keyboard centric.

I never tried it, seems like such a wasted opportunity.

Re:Tmux lets you select and copy text with your keyboard by pacifika on Friday April 02, 2021 @05:19AM (#26670082)
Apple has that its command /
Re:Tmux lets you select and copy text with your keyboard by leejoramo on Friday April 02, 2021 @10:52AM (#26671897)
Yes thanks for mentioning that Apple’s cmd-/ I fell it gets us about a third of the way to a command bar. I prefer this to Windows alt key navigation of menus.
Re:Tmux lets you select and copy text with your keyboard by raverbashing on Friday April 02, 2021 @05:46AM (#26670182)
Completely agree. I love these tools, but the usability (and defaults) are awful

Not to mention they all seem to come from an "old unix" perspective, with weird combinations and few use of bound combinations

Hence why I prefer keeping my terminal tabs not on tmux but on iTerm (or your favourite terminal emulator - except for the Gnome one)

Re:Tmux lets you select and copy text with your keyboard by y04nn on Friday April 02, 2021 @09:34AM (#26671289)
Tmux is a great replacement for screen, but it's true that keyboard shortcuts are atrocious, I think every shortcuts that I use daily are remapped in my tmux.conf. Also when I copy in tmux it automatically change the clipboard and vice-versa, very useful to copy errors or paste snipped of code from internet. And with 'mode-keys vi' it's even faster.
Re:Tmux lets you select and copy text with your keyboard by king_magic on Friday April 02, 2021 @11:39AM (#26672348)
I've had no trouble reading a guide to tmux's keyboard shortcuts and then using them.
Re:Tmux lets you select and copy text with your keyboard by ryanmarsh on Friday April 02, 2021 @11:26AM (#26672181)
Same, I thought I'd be cool and learn tmux (after 25 years of Linux/Unix use). After a year I realized it's just easier to learn the keyboard shortcuts of my favorite terminal client and tile the windows.
Re:Tmux lets you select and copy text with your keyboard by easytiger on Friday April 02, 2021 @08:01AM (#26670710)
Thats completely unfair to the point of being plain wrong.

For a start tmux does have similar interfaces, ability to search all panes etc.

Also comparing tmux to an ide is also possible wrong.

Re:Tmux lets you select and copy text with your keyboard by swiley on Friday April 02, 2021 @08:28AM (#26670873)
I've been messing with Emacs lately, tab completion in M-x is amazing. The editor is surprisingly discoverable because of its "minibuffer" command window.