Live data from Hacker News

Tmux for Mere Mortals

zserge.com

81–90 of 171 posts

Re: Tmux for Mere Mortals

#81
post #32

I recommend people try out byobu from here: https://www.byobu.org/ Provides a nice user friendly layer on top of tmux, much recommended.

I like byobu, but I haven't been able to get onedark for vim/neovim to work with it. Any advice?

Re: Tmux for Mere Mortals

#82
post #48
post #37

Earlier quoted context omitted.

My biggest problem with "mouseless tmux" was copy-paste. How do you deal with that?

Make your own cheatsheet for bindings you need. This way you learn faster and optimize for your own needs. Tmux is exceptional mouseless, though personally I prefer combining with mouse. With xclip, mouse and copy/paste can work over SSH-forwarded X-sessions with C-y and Enter from copy-mode-vi so: # For older versions of tmux: #setw -g mode-mouse on #set -g mouse-resize-pane on #set -g mouse-select-pane on #set -g m…

"For Windows vcxsrv is the simplest and most fool-proof X-Windows server. Anything else on Windows may result in pain."

X servers on Windows are often a bigger cut/paste barrier than tmux. As you mention, vcxsrv seems to work better than other choices. Note there are some cut/paste/clipboard options you have to set.

Re: Tmux for Mere Mortals

#83
If anyone is curious what it looks like to use tmux in your day to day, I made a video about this at: https://nickjanetakis.com/blog/using-tmux-sessions-windows-p...

It covers how I use tmux sessions, windows and splits along with Vim buffers / splits / tabs to manage my work flow for developing applications and switching to different projects within seconds.

Despite the video being almost a year old, I work in the exact same way today. It's been a very wonderful experience. My dotfiles are included at the bottom of the post if you wanted to poke around the configs.

Re: Tmux for Mere Mortals

#84
A lot of people seem to think tmux is a replacement for a window manger which IMO isn’t quite right.

Personally I use it to organize VT sessions by topic; I’ll make a tmux socket in the root of a project (or at work, ticket) folder and leave things like vim running, that way I never end up loosing vim and opening it twice. You still need a window manager in addition to this to handle efermal windows (browsers, REPLs, other VTs with tmux for other projects etc.)

Also it keeps things from getting SIGHUP. Some fancy VT app probably isn’t going to do that and it’s certainly not going to do it in a platform agnostic way.

Re: Tmux for Mere Mortals

#85
post #79
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…

> You can't have it all with the mouse no matter your settings I don't think this is correct; it's just that it's not trivial to get things working well. As you say, it depends on using an up-to-date version of tmux (and sadly, you often can't run a config made for a new version with an older version of tmux). And you'll need your terminal to be up to the task (eg. iTerm2 on macOS; not sure what the best thing on Lin…

I can really recommend the parent's YouTube channel for all sorts of Vim/Tmux nerdery:

https://youtube.com/channel/UCXPHFM88IlFn68OmLwtPmZA

Re: Tmux for Mere Mortals

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

That’s exactly what I’ve done too. In fact I’ve ran that for so long that I’d forgotten it is the default until I read this thread.

Re: Tmux for Mere Mortals

#87
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,…

I think this is very common for tmux usage in general. I think the reason is that terminals seem to benefit the most from tiling WMs, as generally their own internal window management is quite lackluster and you usually want to open many terminals side by side. If you don't have the luxury of a tiling WM (or just want a simple-no-yak-shaving-required WM like Gnome), then tmux can be a real life saver.

Re: Tmux for Mere Mortals

#88
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…

Tmux on my local machine was useless. Tmux on my server has been a godsent. Just connect and re-attach to the tmux session and you are right where you left off.

I did modify the key binds a little bit to make splitting windows and enable the mouse, but otherwise I just don’t need any more advanced behavior.

Re: Tmux for Mere Mortals

#89
post #30

Now would be a cool time to remark that VSCode is adding tmux control mode support (As of yesterday it was added to the backlog) [0]. This will be very useful in persisting terminals. [0] https://github.com/microsoft/vscode/issues/90696

That's the only thing I envy from the VI/Emacs/tmux world is that the editors and terminals can work in the same window in the same spot of the screen and it looks seamless.
Post reply on HN