diff --git a/tmux/README.md b/tmux/README.md index 8b4dfd8..6d2c66b 100644 --- a/tmux/README.md +++ b/tmux/README.md @@ -21,7 +21,7 @@ Table of contents Features --------- -- "C-a" prefix instead of "C-b" (screen like) +- `C-b` prefix (tmux default) - support for nested tmux sessions - local vs remote specific session configuration - scroll and copy mode improvements @@ -137,8 +137,8 @@ If you are an iTerm2 user, third column describes the keybinding of similar "ac iTerm2 key - C-a - Default prefix, used instead of "C-b". Same prefix is used in screen program, and it's easy to type. The only drawback of "C-a" is that underlying shell does not receive the keystroke to move to the beginning of the line. + C-b + Default tmux prefix. - @@ -348,7 +348,7 @@ Nested tmux sessions -------------------- One prefers using tmux on local machine to supercharge their terminal emulator experience, other use it only for remote scenarios to retain session/state in case of disconnect. Things are getting more complex, when you want to be on both sides. You end up with nested session, and face the question: **How you can control inner session, since all keybindings are caught and handled by outer session?**. Community provides several possible solutions. -The most common is to press `C-a` prefix twice. First one is caught by local session, whereas second is passed to remote one. Nothing extra steps need to be done, this works out of the box. However, root keytable bindings are still handled by outer session, and cannot be passed to inner one. +The most common is to press `C-b` prefix twice. First one is caught by local session, whereas second is passed to remote one. Nothing extra steps need to be done, this works out of the box. However, root keytable bindings are still handled by outer session, and cannot be passed to inner one. Second attempt to tackle this issue, is to [setup 2 individual prefixes](https://simplyian.com/2014/03/29/using-tmux-remotely-within-a-local-tmux-session/), `C-b` for local session, and `C-a` for remote session. And, you know, it feels like: @@ -466,15 +466,15 @@ You can setup new profile in iTerm preferences to override default keybindings, ![iterm preferences](https://user-images.githubusercontent.com/768858/33185301-54afc402-d08a-11e7-9622-232a4607df8b.png) -For example, when "^⌘↑" pressed, sequence of bytes `0x01 0x1b 0x5b 0x31 0x3b 0x35 0x41` are sent through terminal to running tmux instance, that interprets them as `C-a C-↑` keybinding and triggers `resize-pane -U` according to our `.tmux.conf` configuration. +For example, when "^⌘↑" pressed, sequence of bytes `0x02 0x1b 0x5b 0x31 0x3b 0x35 0x41` are sent through terminal to running tmux instance, that interprets them as `C-b C-↑` keybinding and triggers `resize-pane -U` according to our `.tmux.conf` configuration. You can get binary representation of any keys, using `showkey` or `od` commands ``` $od -t x1 -^A^[[1;5A // press C-a C-↑ on your keyboard -0000000 01 1b 5b 31 3b 35 41 +^B^[[1;5A // press C-b C-↑ on your keyboard +0000000 02 1b 5b 31 3b 35 41 0000007 ```