Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap last-window & send-prefix bindings #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

### master
- swap `last-window` & `send-prefix` bindings
- remove `detach-on-destroy`
- do not set `aggressive-resize` on iTerm terminal
- disable `detach-on-destroy`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

# if prefix is 'C-a'
bind C-a send-prefix
bind a last-window
bind C-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-z`, above keys will be `C-z` and `z`... you get the idea.
Expand Down
8 changes: 4 additions & 4 deletions sensible.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ main() {
tmux unbind-key C-b
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
tmux bind-key "$prefix" send-prefix
tmux bind-key "$prefix_without_ctrl" send-prefix
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.
if key_binding_not_set "$prefix_without_ctrl"; then
tmux bind-key "$prefix_without_ctrl" last-window
tmux bind-key "$prefix" last-window
fi

# easier switching between next/prev window
Expand Down