mirror of
https://github.com/tmux-plugins/tmux-sensible.git
synced 2024-11-24 00:48:46 +00:00
Swap last-window & send-prefix bindings
C-a is last-window, a is send-prefix. This is consistent with screen bindings; C-a C-a toggles to last window, and C-a a sends the command character. last-window is usually also needed more often, so it makes sense to make it more accessible. Fixes #40.
This commit is contained in:
parent
e91b178ff8
commit
e97f076c55
@ -1,6 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
### master
|
### master
|
||||||
|
- swap `last-window` & `send-prefix` bindings
|
||||||
- remove `detach-on-destroy`
|
- remove `detach-on-destroy`
|
||||||
- do not set `aggressive-resize` on iTerm terminal
|
- do not set `aggressive-resize` on iTerm terminal
|
||||||
- disable `detach-on-destroy`
|
- disable `detach-on-destroy`
|
||||||
|
@ -72,8 +72,8 @@ allowing you to hold `Ctrl` and repeat `a + p`/`a + n` (if your prefix is
|
|||||||
"Adaptable" key bindings that build upon your `prefix` value:
|
"Adaptable" key bindings that build upon your `prefix` value:
|
||||||
|
|
||||||
# if prefix is 'C-a'
|
# if prefix is 'C-a'
|
||||||
bind C-a send-prefix
|
bind C-a last-window
|
||||||
bind a last-window
|
bind a send-prefix
|
||||||
|
|
||||||
If prefix is `C-b`, above keys will be `C-b` and `b`.<br/>
|
If prefix is `C-b`, above keys will be `C-b` and `b`.<br/>
|
||||||
If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea.
|
If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea.
|
||||||
|
@ -131,16 +131,16 @@ main() {
|
|||||||
tmux unbind-key C-b
|
tmux unbind-key C-b
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# pressing `prefix + prefix` sends <prefix> to the shell
|
# pressing `Ctrl-prefix + prefix` sends <prefix> to the shell
|
||||||
if key_binding_not_set "$prefix"; then
|
if key_binding_not_set "$prefix"; then
|
||||||
tmux bind-key "$prefix" send-prefix
|
tmux bind-key "$prefix_without_ctrl" send-prefix
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If Ctrl-a is prefix then `Ctrl-a + a` switches between alternate windows.
|
# If Ctrl-a is prefix then `Ctrl-a + Ctrl-a` switches between alternate windows.
|
||||||
# Works for any prefix character.
|
# Works for any prefix character.
|
||||||
if key_binding_not_set "$prefix_without_ctrl"; then
|
if key_binding_not_set "$prefix_without_ctrl"; then
|
||||||
tmux bind-key "$prefix_without_ctrl" last-window
|
tmux bind-key "$prefix" last-window
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# easier switching between next/prev window
|
# easier switching between next/prev window
|
||||||
|
Loading…
Reference in New Issue
Block a user