Contents
How to bind the prefix key in tmux?
With an appropriate build of tmux1, all you have to do is bind the keys in your tmux configuration: You will still need to type your prefix key before these keys. (Note: ~/.tmux.conf is only processed when the server starts.
Is there a way to reset tmux bindings?
While I’ve personally never needed this it does seem like there should be a way to reset the bindings to the tmux defaults without jumping through hoops in order to aid recovery from installing bad bindings. For example, unbind-key -R to mean “Reset the bindings to defaults”.
Why are home / end keys not working in tmux?
When in bash under tmux, pressing home/end would insert tilde characters (~). Outside of tmux the home/end keys work fine. Using cat and tput, I could see that there was a mismatch between the generated and expected sequences:
How to enable xterm key sequences in tmux?
Also, if you want tmux to pass along these (and other) xterm-style key sequences to programs running inside tmux, then you will need to enable the xterm-keys window option. (If you prefer, you can do this on a per-window basis by using -w instead of -gw .)
How can I change C-B to C-a in tmux?
As you know, C-b is the default prefix in tmux. C-b C-b is used to send an actual C-b character to the terminal. If you switch the prefix to C-a, you just need to rebind some keys to update which one sends the send-prefix command. For your .tmux.conf: After those keybindings are in place, C-a C-a.
How to separate multiple commands in tmux bind shell?
You can use \\; to separate multiple commands in a single key binding: If using the tmux bind shell command you may need to quote the commands instead: A multiline format is also possible by ending each line with \\ or (if the line is part of the command) \\; \\. Example:
What to do if you make changes to tmux?
If you make changes to it, you will either need to exit all your sessions and restart the server, or use (e.g.) tmux source ~/.tmux.conf to have your existing server re-process the file.)
When does tmux recognize xterm style key sequences?
Recent “unreleased” versions of tmux do automatically recognize those xterm-style key sequences once you have your terminal sending them (no need to change your terminfo entry). The next release version (1.8?) should also have this support.
Why do lines not start with tab in terminfo?
The problem with your terminfo entry editing is probably because each line after the one that names the terminal type needs to start with a Tab. Lines that do not start with a tab are the beginning of a new terminal entry. Technically, the NL TAB sequence is basically a line continuation in this file format; each entry is a single logical line.