4 ms·
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
by tjoff 7y ago
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 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...
- abcdef123xyz 7y agoThere is no consensus on the best prefix so there is no point in changing it after 10 years. Lots of people dislike C-a.
- tjoff 7y agoI can imagine, what is best will likely depend on preference. But at least the defaults should be sensible.
- abcdef123xyz 7y agoThere is no agreement on what is sensible and what is not, the defaults are no more or less sensible than any other suggestion.
- tjoff 7y agoOh, yes there are. C-b is terrible for your wrist, especially in conjunction with the following commands. Choosing C-a isn't as much about preference as it is about not-terrible ergonomics. Now people are right to prefer anything other than C-a or C-b but C-a is objectively a much saner default than C-b.
- abcdef123xyz 7y agoAbsolute nonsense, are you trying to press C-b with one hand?
- tjoff 7y agoYes. Left ctrl is in a better placement on many keyboards. Also being able to perform shortcuts with one hand is very handy.
- abcdef123xyz123 7y agoIf it hurts your wrist pressing it with one hand, perhaps you should use two...
- tjoff 7y agoOr choose a shortcut that works with either.
- prsy 7y agoThe problem is with ctrl positioning, there was a time when it was more commonly found on the home row [0]. Rebinding caps lock to control turns the motion from an awkward wrist snap to a slight spreading of your left hand fingers. [0] http://xahlee.info/kbd/keyboard_ctrl_vs_capslock_position.html http://xahlee.info/kbd/keyboard_ctrl_vs_capslock_position.ht...
- tjoff 7y agoPersonally I've bound caps lock to ESC, but given the emacs style shortcuts it does make sense. Thanks.
- u801e 7y ago> C-b is terrible for your wrist I always use the modifier key on the opposite side of the keyboard to avoid that issue. So for ctrl-b , I press the ctrl key on the right side of the keyboard worth my right pinky and press the b key with my left index finger.
- JerwuQu 7y agoI think another reason is because some people use Ctrl+a in bash for jumping to the start of the line.
- tjoff 7y agoThanks, that is a good point!