Live data from Hacker News

Tmux for Mere Mortals

zserge.com

1–10 of 171 posts

Re: Tmux for Mere Mortals

#3
Tmux is what makes Linux worth it for me. Or more specifically, the command line. It is incredibly freeing, and discovering it is what made me finally choose the sysadmin path over outright programming.

Fun Fact: Google Cloud Shell is by default Tmux. You can tell, because you don't need to start Tmux up ever if you are in it. Simply hit something like ctrl+b++" and watch your terminal split in two.

Re: Tmux for Mere Mortals

#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, unless you're using a tiling WM for your system , in which case this is hopeless :-)

BTW, for any newbies looking to start out with tiling window managers, I would highly recommend Regolith (which is basically i3 with a nice set of conventions).

Re: Tmux for Mere Mortals

#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.

Re: Tmux for Mere Mortals

#6

Tmux is what makes Linux worth it for me. Or more specifically, the command line. It is incredibly freeing, and discovering it is what made me finally choose the sysadmin path over outright programming. Fun Fact: Google Cloud Shell is by default Tmux. You can tell, because you don't need to start Tmux up ever if you are in it. Simply hit something like ctrl+b++" and watch your terminal split in two.

There's life before, and life after tmux.

It's like a new dimension. Or two, or n, actually.

I'm pretty sure the Buddha once said “Man's suffering comes from not using tmux.” Illusion of impermanence and all that.

Re: Tmux for Mere Mortals

#7
IMO these are the most important tmux config directives.

  # Inherit directory
  bind '%' split-window -h -c '#{pane_current_path}'
  bind '"' split-window -v -c '#{pane_current_path}'
  bind c new-window -c '#{pane_current_path}'

  # Vim pane movement
  bind h select-pane -L
  bind l select-pane -R
  bind k select-pane -U
  bind j select-pane -D
  
  # Misc
  set -g renumber-windows on
  set -g escape-time 0

My prefix is Ctrl+F fwiw (on the inner session), I think with capslock as control I wouldn't want to bother remembering and committing to one-stroke bindings.

System Preferences > Keyboard > Modifier Keys on Mac, I think it's xkbdmap or such on Linux/X11.

Edit: not to detract from the OP, it looks like they put a lot of thought into the ones they made so I'd do well to give them a shot. I'm happy tmux makes it so easy to bind keys as such.

Re: Tmux for Mere Mortals

#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 barrier for entry and or improves things is great.

Personally I like to try the defaults for a reasonable length of time to see if there is maybe some logic behind why they were chosen. I’ve gotten so used to the defaults now that I don’t think I would change too much except for this one thing:

- Opening a new pane or window was customized to start in the folder where the command was originated from.

Re: Tmux for Mere Mortals

#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!

Re: Tmux for Mere Mortals

#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 just opening new shell windows as needed. I need to be able to resize and scroll, selecting text and copy behavior should be exactly like mac os. Even used a tiling window manager with it for a bit, but it felt pretty restrictive so I went back to just using the cursor to move things around.

Post reply on HN