4 ms·
Tmux is easily one of my all time favorite and most used tools, behind (maybe) only Vim/Neovim. I use every feature it offers: scroll back, copy buffers, windo
by gpanders 6y ago
Tmux is easily one of my all time favorite and most used tools, behind (maybe) only Vim/Neovim.
I use every feature it offers: scroll back, copy buffers, window splitting/management, different sessions for different projects, etc. I do a lot of work on different servers (it’s not uncommon for me to be connected to 4 different servers at once) and having tmux on all of them means I can always pick up right where I left off. If I’m starting a long build on a Friday afternoon, no problem: start it in the remote tmux session and simply detach from tmux and log off. When I come back on Monday morning, I just SSH back in, reattach to the tmux server, and it’s like I never left.
Tmux has a steep learning curve for sure, but if you are a terminal user at all I cannot recommend it highly enough. It’s a game changer.
- mikeyjk 6y agoCould you recommend any good articles? I've dabbled and enjoyed it but it never stuck with me. I think I found the session management / default pane arrangement tricky, and would forget the hotkeys after a week or two of not using it.
- gpanders 6y agoI’m sure I must have read a few articles many years ago when I first started using tmux, but I can’t remember what they are now and I wouldn’t be able to provide you anything that you wouldn’t just find on a simple search. Maybe I will sit down and write one so that I can offer something if this ever comes up again. Developing the muscle memory definitely takes some work and no doubt it will feel awkward and unnatural at first. I would offer the same advice I would offer to someone getting started with Vim: don’t try to learn everything at once. Start with the basics, get comfortable, and over time you’ll learn more and more little tricks. For example, start with just getting comfortable with creating new windows (prefix + c), splitting windows (prefix + % or prefix + “), moving between panes (prefix + arrow keys), and moving between windows (prefix + n and prefix + p). If you’re used to using the mouse, you can also enable mouse mode which will make the transition a bit easier (this allows you to select panes by clicking into them and using the scroll wheel to scroll within panes). I know offering raw config files is kind of a trope and not always helpful, but here are mine [1] if you’re curious. I try to keep my config minimal and not too fancy, but I do override/change some defaults. [1]: https://git.sr.ht/~gpanders/dotfiles/tree/master/item/.config/tmux/tmux.conf https://git.sr.ht/~gpanders/dotfiles/tree/master/item/.confi...
- gmassman 6y agoNice little tidbit about searching from normal mode, I'll be sure to copy that into my own .tmux.conf!
- brownjohnf 6y agoWhen I started out with tmux (and I echo the parent comment’s sentiment about it being a core piece of my workflow) I found https://pragprog.com/titles/bhtmux2/tmux-2/ https://pragprog.com/titles/bhtmux2/tmux-2/ to be extremely useful. It’s very brief and digestible, and sets you up to make any further customizations you want.
- m-p-3 6y agoFor me, just keeping my session active in case of a disconnect is worth it, especially when using SSH on a mobile.