4 ms·
Here's a few ways I've used tmux: 1. Hierarchical context management. I use different sessions for different projects. One session might have my main developme
by epberry 10y ago
Here's a few ways I've used tmux:
1. Hierarchical context management. I use different sessions for different projects. One session might have my main development work, one session for a random debugging session for a coworker, one session for a side project or project euler challenge. Within each session I usually have multiple windows. For main development I have one window that has source code and development, one window for testing, and one window for command line/ data wrangling. Within each window I might have a couple panes, for example in testing I have a split screen with testing code on the left and the command line for running tests on the right.
2. Multiple paste buffers. Recently I had 3 or 4 environmental variables I was setting on some different devices. I stuck them into different copy paste buffers and went to town instead of repeatedly copying and pasting from a document.
3. Alerts. I'll often have a few jobs that run for between an hour and a couple hours that I want to just start and forget about. When they're done you can have tmux give you a notification on the window that the job was in and you can go check it out and do more work.
Minor, but interesting use cases:
- share tmux sessions with coworkers. I haven't done this as much but it's great for remote debugging.
- process persistence. Use this all the time. No more nohup & business.
- naming windows. I name almost all my windows like "test" or "hardware".
- moving windows and panes around. You can move panes to different windows and windows to different sessions really easily.
- save tmux state before shutdown. There's a separate plugin that does this but you an actually write your current session to disk and load it up again when you restart.
EDIT: formatting