mirror of
https://github.com/tmux-plugins/tmux-sensible.git
synced 2024-11-16 04:08:47 +00:00
Add key descriptions
These key descriptions can be shown using <Prefix>-?.
This commit is contained in:
parent
e91b178ff8
commit
222755e617
@ -133,27 +133,27 @@ main() {
|
|||||||
|
|
||||||
# pressing `prefix + prefix` sends <prefix> to the shell
|
# pressing `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 -N 'Send the prefix key' "$prefix" 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 + 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 -N 'Select the last (previously selected) window' "$prefix_without_ctrl" last-window
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# easier switching between next/prev window
|
# easier switching between next/prev window
|
||||||
if key_binding_not_set "C-p"; then
|
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
|
fi
|
||||||
if key_binding_not_set "C-n"; then
|
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
|
fi
|
||||||
|
|
||||||
# source `.tmux.conf` file - as suggested in `man tmux`
|
# source `.tmux.conf` file - as suggested in `man tmux`
|
||||||
if key_binding_not_set "R"; then
|
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 source-file ~/.tmux.conf > /dev/null; \
|
||||||
tmux display-message "Sourced .tmux.conf!"'
|
tmux display-message "Sourced .tmux.conf!"'
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user