Live data from Hacker News

Tmux for Mere Mortals

zserge.com

11–20 of 171 posts

Re: Tmux for Mere Mortals

#11
post #8

I spend a lot of my time using VIM. About 6 months ago I started using tmux. I can honestly say I love it. It was a little rough at first but I just made a cheat sheet on a piece of paper the size of a business card. That helped a lot. The default keys start to feel okay just like with VIM. I don’t have any problem with people customizing tools however they want so this post is really great. Anything that lowers the…

Something cool to try is to blend your tmux bindings with your vim bindings: https://gist.github.com/mislav/5189704

Mislav Marohnić has a super nice method of moving between tmux splits and vim splits the same way so you don’t really get stuck thinking one split is actually the other.

This would drive me crazy, but after a little hacking, my tmux/vim combo feels so nice and snappy.

Re: Tmux for Mere Mortals

#12
post #4

What this author has settled on looks very similar to commonly used tiling window manager shortcuts (which should not be very surprising, because a lot of the constraints desired by the author apply to the other situation also). In fact, even more directly, the author is basically using TMUX as a the tiling window manager for their terminals. So, I guess the funny thing is, this gives a nice bunch of Tmux shortcuts,…

Portability and accessibility do work in tmux's favour which a tiling window manager (I was on ion3 for ages) cant emulate. I probably have a weird development style but with tmux/ssh and the same session I can..

* Work from my desktop

* move to my laptop on the couch

* nick off to a cafe (well perhaps not atm) on an ipad.

* keep tabs on long running processes on my phone and termux.

all with a consistent interface. I think it's worth getting a working knowledge up.

Re: Tmux for Mere Mortals

#13
post #9
post #5

> Now tmux feels like a regular desktop app and truly boosts the productivity in the terminal. What do you think? I think it's really nice. Well done! > Mod+V: split vertically > Mod+B: split horizontally (“bisect”) That's smart . I love it! % and " tend to feel... just weird. I can see the visual cue, but it's always been weird to me nonetheless.

I’ve always done: > Mod+| for vertical split > Mod+- for horizontal split I’ve been using it like that for years, but haven’t seen it in too many places like that. It just feels super logical since the symbols look like the split!

Makes so much sense, indeed!

Mod+- might be zoom out though, depending on your underlying terminal app / OS. (e.g. on Linux, I use Meta++ and Meta+- to zoom the whole screen in accessibility mode, and Ctrl with the same keys changes the terminal font size)

I may have to find a way to change one of those because I like your idea very much.

FWIW, I'm always looking for the "perfect" keyboard-only shortcut layout. At one time using AutoHotKey on Windows (long time ago), I juggled with 5 levels of mods and had encoded pretty much all of math, greek, ASCII art and whatnot I could ever use. It was awesome. AHK is the one program I truly, dearly miss on Linux. (at least on KDE, and Gnome afaik, there's just no substitute for the breadth of features and behaviors of AHK).

Re: Tmux for Mere Mortals

#14
post #9
post #5

> Now tmux feels like a regular desktop app and truly boosts the productivity in the terminal. What do you think? I think it's really nice. Well done! > Mod+V: split vertically > Mod+B: split horizontally (“bisect”) That's smart . I love it! % and " tend to feel... just weird. I can see the visual cue, but it's always been weird to me nonetheless.

I’ve always done: > Mod+| for vertical split > Mod+- for horizontal split I’ve been using it like that for years, but haven’t seen it in too many places like that. It just feels super logical since the symbols look like the split!

I've been using those for some time, before I met German keyboards with weird layouts. Now I try to stick to alphanumeric symbols only.

Re: Tmux for Mere Mortals

#16
post #5

> Now tmux feels like a regular desktop app and truly boosts the productivity in the terminal. What do you think? I think it's really nice. Well done! > Mod+V: split vertically > Mod+B: split horizontally (“bisect”) That's smart . I love it! % and " tend to feel... just weird. I can see the visual cue, but it's always been weird to me nonetheless.

Honestly, for me the split keys are just muscle memory at this point, same as 'hjkl' in Vim. Same with my prefix- I used backticks for the longest time, and now I use Ctrl-Space, but I generally don't think about it anymore. (Along the same lines, I screw up and occasionally type "jj" or ":wq" in message boxes out of force of habit from Vim.)

It's weird- as I'm typing this comment, I tried issuing "Ctrl-Space %" a couple times just to test, and I get a very slight mental "misstep" because the comment box isn't splitting in half!

Re: Tmux for Mere Mortals

#17
post #10

Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…

Yes, the mouse situation in tmux is catastrophic.

As much as I love tmux, I wonder what would it take that the program respects the usual copy-paste conventions like all the rest of X programs. You need to do two things, that are apparently impossible when tmux has "mouse enabled":

1. select some text in your xterm so that it gets copied

2. middle click on the xterm and your copied text (possibly from other window, web browser, whatever) gets pasted at the cursor position

This is really simple and sane behavior but it's completely impossible to achieve with the current version of tmux. I have spend much more time that I am willing to admit seriously trying to do that.

Re: Tmux for Mere Mortals

#18
post #10

Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…

> realizing it was never going to work how I liked.

> You can't have it all with the mouse no matter your settings

> so I went back to just using the cursor to move things around.

These tools (vim, tmux, etc.) work great for mouseless setups. If you can get comfortable with a 100% keyboard control paradigm, it might work for you. I realize this might not be what you want, but if the statement "spend less time moving your hand between keyboard and mouse" resonates, it's worth revisiting.

Re: Tmux for Mere Mortals

#19
post #10

Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…

Yes, the mouse situation in tmux is catastrophic. As much as I love tmux, I wonder what would it take that the program respects the usual copy-paste conventions like all the rest of X programs. You need to do two things, that are apparently impossible when tmux has "mouse enabled": 1. select some text in your xterm so that it gets copied 2. middle click on the xterm and your copied text (possibly from other window, w…

This is little to do with tmux and much to do with the features offered to terminal applications by terminal emulators. Both clipboard and mouse support in terminals generally is quite limited. For the clipboard, this page documents how to configure it within the limits of what is possible: https://github.com/tmux/tmux/wiki/Clipboard

Re: Tmux for Mere Mortals

#20
post #10

Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…

Yes, the mouse situation in tmux is catastrophic. As much as I love tmux, I wonder what would it take that the program respects the usual copy-paste conventions like all the rest of X programs. You need to do two things, that are apparently impossible when tmux has "mouse enabled": 1. select some text in your xterm so that it gets copied 2. middle click on the xterm and your copied text (possibly from other window, w…

The top reason I did start using tmux was because of how you can select text with the keyboard in copy mode (like visual in vim mode). Then I got the plugin tmux-plugins/tmux-yank which adds "y" command to copy the text. Also works with selection by mouse.

I've run this setup now for something like 5 years across multiple tmux versions and OSes (Ubuntu and Arch) without any hiccups.

But then I think tmux is a tool geared towards keyboard usage and not mouse. The mouse stuff was added because others wanted it, not because it was part of the core idea of what tmux wanted to provide. So if you go against that, you'll bang your head a little.

Post reply on HN