Looks like some of the shortcuts are really RSI prone, i.e. ctrl + b + & (where & is shift + 7). Are there any possibilities to have more wrist-friendly shortcuts?
Tmux Tutorial
51–60 of 166 posts
Re: Tmux Tutorial
#52Looks like some of the shortcuts are really RSI prone, i.e. ctrl + b + & (where & is shift + 7). Are there any possibilities to have more wrist-friendly shortcuts?
1) press ctrl + b
2) release
3) press shift + 7
You may already know this, and the RSI concerns still stand (I'm not sure what all goes into RSI risks), but wanted to clarify if the concern is over pressing 4 keys at the same time that are all over the keyboard.
Re: Tmux Tutorial
#53Looks like some of the shortcuts are really RSI prone, i.e. ctrl + b + & (where & is shift + 7). Are there any possibilities to have more wrist-friendly shortcuts?
# remap prefix from 'C-b' to 'C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
I've heard that he reason for ctrl + b is because screen uses ctrl + a, which just doesn't make any sense to me. You can nest both tmux and screen and to get to an inner layer you press (if ctrl + a has been mapped) ctrl + a + a - and now your command is sent to the inner tmux/screen.Defaults matter. It is not feasible to configure this on every machine you touch so one have to remember both the default one and the sane one...
Re: Tmux Tutorial
#54Looks like some of the shortcuts are really RSI prone, i.e. ctrl + b + & (where & is shift + 7). Are there any possibilities to have more wrist-friendly shortcuts?
A very common change is to change the prefix to ctrl + a, like this in your tmux.conf: # remap prefix from 'C-b' to 'C-a unbind C-b set-option -g prefix C-a bind-key C-a send-prefix I've heard that he reason for ctrl + b is because screen uses ctrl + a, which just doesn't make any sense to me. You can nest both tmux and screen and to get to an inner layer you press (if ctrl + a has been mapped) ctrl + a + a - and now…
Re: Tmux Tutorial
#55One of the downsides listed when you don't use tmux is that you have to type your password for each terminal you open to the remote machine. Does no one use ssh-agent?
This somewhat painfully breaks when reattaching as the socket from the shells environment could be defunct. Whereas the shell session outside has a different, totally fine agent in its environment. This was somewhat painful to explain to some engineers and I suck at explaining so I’ll gladly receive a good explanation for it (or a nice workaround?) :D
For that I use a file to save the name of the socket and PID, and restore this in my .profile.
Re: Tmux Tutorial
#56Looks like some of the shortcuts are really RSI prone, i.e. ctrl + b + & (where & is shift + 7). Are there any possibilities to have more wrist-friendly shortcuts?
Re: Tmux Tutorial
#57Earlier quoted context omitted.
A very common change is to change the prefix to ctrl + a, like this in your tmux.conf: # remap prefix from 'C-b' to 'C-a unbind C-b set-option -g prefix C-a bind-key C-a send-prefix I've heard that he reason for ctrl + b is because screen uses ctrl + a, which just doesn't make any sense to me. You can nest both tmux and screen and to get to an inner layer you press (if ctrl + a has been mapped) ctrl + a + a - and now…
There is no consensus on the best prefix so there is no point in changing it after 10 years. Lots of people dislike C-a.
But at least the defaults should be sensible.
Re: Tmux Tutorial
#58Earlier quoted context omitted.
I prefer tmux to screen but the default key mappings took some getting used to. I've used it long enough that Ctrl-B and " / % for the screen splitting are natural to me now, but initially it was ... rough.
You could remapped whatever you don’t link. I have Caps Lock set to be Ctrl and tmux set to use Ctrl+a. For a vertical split, I have it mapped to Ctrl+a, |. For horizontal, Ctrl+a, - It’s pretty flexible.
Re: Tmux Tutorial
#59Cool, a coworker showed me tmux yesterday. One question we had was about scrolling in the tmux window and keeping the terminal output (as in Linux where I can scroll back with Shift+PageUp). Does anybody knows how that works with tmux?
Note that you have to press Q to exit this mode :(
Re: Tmux Tutorial
#60One tip I didn't see mentioned (though it's pretty common in tmux) is to use the default window layouts for organizing multiple panes. You do this with Ctrl + b followed by esc + . esc + 1: All windows take up equal space horizontally, and stretch the full vertical width esc + 2: All windows take up equal space vertically, and stretch the full vertical width esc + 3: The first window takes up half of the screen verti…