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

Add key descriptions #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions sensible.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -133,27 +133,27 @@ main() {

# pressing `prefix + prefix` sends <prefix> to the shell
if key_binding_not_set "$prefix"; then
tmux bind-key "$prefix" send-prefix
tmux bind-key -N 'Send the prefix key' "$prefix" send-prefix
fi
fi

# If Ctrl-a is prefix then `Ctrl-a + 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 -N 'Select the last (previously selected) window' "$prefix_without_ctrl" last-window
fi

# easier switching between next/prev window
if key_binding_not_set "C-p"; then
tmux bind-key C-p previous-window
tmux bind-key -N 'Select the previous window' C-p previous-window
fi
if key_binding_not_set "C-n"; then
tmux bind-key C-n next-window
tmux bind-key -N 'Select the next window' C-n next-window
fi

# source `.tmux.conf` file - as suggested in `man tmux`
if key_binding_not_set "R"; then
tmux bind-key R run-shell ' \
tmux bind-key -N 'Source ~/.tmux.conf' R run-shell ' \
tmux source-file ~/.tmux.conf > /dev/null; \
tmux display-message "Sourced .tmux.conf!"'
fi
Expand Down