Getting Started with Tmux
101–110 of 160 posts
Re: Getting Started with Tmux
#102The best way to use tmux is with -CC, which iTerm maps to native UI. tmux tabs and panes become native tabs and panes and your session is immortal, and it’s a far better experience than mosh or whatever the latest thing in this area is. I have never bothered to figure out how the keybindings actually work and I probably never will, but I enjoy using it all the time because of this.
I started doing this last week along with tmuxp for managing window sets. It works great.
Re: Getting Started with Tmux
#103My favourite tmux trick only works on an apple gb keyboard: set -g prefix ` bind-key e send-prefix Then, all your tmux controls are one left pinky press away (` is beside z on uk Mac keyboards). (`e sends a ` for when you need it, rare though, $() is better for sub shells :})
But then again those types of users are also likely already hyper aware of hotkey modifications and optimizations.
Re: Getting Started with Tmux
#104Re: Getting Started with Tmux
#105enter copy mode: LEADER [
highlight text to copy: press space and then arrow w and b to highlight words (like vi editor)
exit copy mode: press enter key or Q
paste copied text: LEADER ] OR cmd+V
Re: Getting Started with Tmux
#106The only extra thing I want from tmux is to persist sessions across reboots and shutdowns. I found a plugin called tmux-resurrect but it would be nice as a base feature.
I use https://github.com/tmuxinator/tmuxinator for my workspaces. Doesn't save ad-hoc layouts, but usually I find one layout that works per project, then create a tmuxinator config for it, so after reboot, it's a short "tmuxinator start $my-project" away to get back to how I want it to be.
Re: Getting Started with Tmux
#107I've used Tmux/Screen the few times I've had to be in an actual terminal, but don't really see the use for them when using a GUI terminal emulator. I just open new tabs or (rarely) windows as needed. Could anyone using these explain what it provides that you find useful in practice? I rarely ever need persistence of shell when I close the console, is that a common need? Familiarity/muscle memory of shortcuts is a val…
Re: Getting Started with Tmux
#108My favourite tmux trick only works on an apple gb keyboard: set -g prefix ` bind-key e send-prefix Then, all your tmux controls are one left pinky press away (` is beside z on uk Mac keyboards). (`e sends a ` for when you need it, rare though, $() is better for sub shells :})
Unless you already took that mentality to the next step, and put your Esc key where the most people have their backtick key, with the (comparatively rarely used) backtick key on a second layer. But then again those types of users are also likely already hyper aware of hotkey modifications and optimizations.
Re: Getting Started with Tmux
#109My favorite antipattern is, you can just leave a script that does an event loop running in the foreground, detatch tmux, and voila, you have a 'server'. Works great in a pinch or when you just don't need to finish it.
Re: Getting Started with Tmux
#110Tmux becomes more awesome when you use something like Alacritty or Kitty [EDIT: scratch Kitty, this mainly applies to Alacritty] and map your system's key (Apple's command key or... whatever it would be on Linux or Windows) and use that as your "tmux key". That way you can make single-chord bindings for all things tmux and life becomes better. If you use Vim, adding VimTmuxNavigator[0] improves things so much. For ex…