Adds notes to the keybindings created in the tmux config making them show up in C-b ? and tmux list-keys -N Fixes #2540
This commit is contained in:
parent
7cf15b19a9
commit
e96fc6d8f9
|
@ -49,8 +49,8 @@ let
|
||||||
${optionalString cfg.newSession "new-session"}
|
${optionalString cfg.newSession "new-session"}
|
||||||
|
|
||||||
${optionalString cfg.reverseSplit ''
|
${optionalString cfg.reverseSplit ''
|
||||||
bind v split-window -h
|
bind -N "Split the pane into two, left and right" v split-window -h
|
||||||
bind s split-window -v
|
bind -N "Split the pane into two, top and bottom" s split-window -v
|
||||||
''}
|
''}
|
||||||
|
|
||||||
set -g status-keys ${cfg.keyMode}
|
set -g status-keys ${cfg.keyMode}
|
||||||
|
@ -58,34 +58,40 @@ let
|
||||||
|
|
||||||
${optionalString
|
${optionalString
|
||||||
(cfg.keyMode == "vi" && cfg.customPaneNavigationAndResize) ''
|
(cfg.keyMode == "vi" && cfg.customPaneNavigationAndResize) ''
|
||||||
bind h select-pane -L
|
bind h -N "Select pane to the left of the active pane" select-pane -L
|
||||||
bind j select-pane -D
|
bind j -N "Select pane below the active pane" select-pane -D
|
||||||
bind k select-pane -U
|
bind k -N "Select pane above the active pane" select-pane -U
|
||||||
bind l select-pane -R
|
bind l -N "Select pane to the right of the active pane" select-pane -R
|
||||||
|
|
||||||
bind -r H resize-pane -L ${toString cfg.resizeAmount}
|
bind -r -N "Resize the pane left by ${toString cfg.resizeAmount}" \
|
||||||
bind -r J resize-pane -D ${toString cfg.resizeAmount}
|
H resize-pane -L ${toString cfg.resizeAmount}
|
||||||
bind -r K resize-pane -U ${toString cfg.resizeAmount}
|
bind -r -N "Resize the pane down by ${toString cfg.resizeAmount}" \
|
||||||
bind -r L resize-pane -R ${toString cfg.resizeAmount}
|
J resize-pane -D ${toString cfg.resizeAmount}
|
||||||
|
bind -r -N "Resize the pane up by ${toString cfg.resizeAmount}" \
|
||||||
|
K resize-pane -U ${toString cfg.resizeAmount}
|
||||||
|
bind -r -N "Resize the pane right by ${toString cfg.resizeAmount}" \
|
||||||
|
L resize-pane -R ${toString cfg.resizeAmount}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
${if cfg.prefix != null then ''
|
${if cfg.prefix != null then ''
|
||||||
# rebind main key: ${cfg.prefix}
|
# rebind main key: ${cfg.prefix}
|
||||||
unbind C-${defaultShortcut}
|
unbind C-${defaultShortcut}
|
||||||
set -g prefix ${cfg.prefix}
|
set -g prefix ${cfg.prefix}
|
||||||
bind ${cfg.prefix} send-prefix
|
bind -N "Send the prefix key through to the application" \
|
||||||
|
${cfg.prefix} send-prefix
|
||||||
'' else
|
'' else
|
||||||
optionalString (cfg.shortcut != defaultShortcut) ''
|
optionalString (cfg.shortcut != defaultShortcut) ''
|
||||||
# rebind main key: C-${cfg.shortcut}
|
# rebind main key: C-${cfg.shortcut}
|
||||||
unbind C-${defaultShortcut}
|
unbind C-${defaultShortcut}
|
||||||
set -g prefix C-${cfg.shortcut}
|
set -g prefix C-${cfg.shortcut}
|
||||||
bind ${cfg.shortcut} send-prefix
|
bind -N "Send the prefix key through to the application" \
|
||||||
|
${cfg.shortcut} send-prefix
|
||||||
bind C-${cfg.shortcut} last-window
|
bind C-${cfg.shortcut} last-window
|
||||||
''}
|
''}
|
||||||
|
|
||||||
${optionalString cfg.disableConfirmationPrompt ''
|
${optionalString cfg.disableConfirmationPrompt ''
|
||||||
bind-key & kill-window
|
bind-key -N "Kill the current window" & kill-window
|
||||||
bind-key x kill-pane
|
bind-key -N "Kill the current pane" x kill-pane
|
||||||
''}
|
''}
|
||||||
|
|
||||||
setw -g aggressive-resize ${boolToStr cfg.aggressiveResize}
|
setw -g aggressive-resize ${boolToStr cfg.aggressiveResize}
|
||||||
|
|
|
@ -19,8 +19,8 @@ set -g mode-keys emacs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bind-key & kill-window
|
bind-key -N "Kill the current window" & kill-window
|
||||||
bind-key x kill-pane
|
bind-key -N "Kill the current pane" x kill-pane
|
||||||
|
|
||||||
|
|
||||||
setw -g aggressive-resize off
|
setw -g aggressive-resize off
|
||||||
|
|
|
@ -10,8 +10,8 @@ setw -g pane-base-index 0
|
||||||
|
|
||||||
new-session
|
new-session
|
||||||
|
|
||||||
bind v split-window -h
|
bind -N "Split the pane into two, left and right" v split-window -h
|
||||||
bind s split-window -v
|
bind -N "Split the pane into two, top and bottom" s split-window -v
|
||||||
|
|
||||||
|
|
||||||
set -g status-keys emacs
|
set -g status-keys emacs
|
||||||
|
|
|
@ -20,7 +20,8 @@ set -g mode-keys emacs
|
||||||
# rebind main key: C-a
|
# rebind main key: C-a
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set -g prefix C-a
|
set -g prefix C-a
|
||||||
bind C-a send-prefix
|
bind -N "Send the prefix key through to the application" \
|
||||||
|
C-a send-prefix
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,8 @@ set -g mode-keys emacs
|
||||||
# rebind main key: C-a
|
# rebind main key: C-a
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set -g prefix C-a
|
set -g prefix C-a
|
||||||
bind a send-prefix
|
bind -N "Send the prefix key through to the application" \
|
||||||
|
a send-prefix
|
||||||
bind C-a last-window
|
bind C-a last-window
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ setw -g pane-base-index 0
|
||||||
|
|
||||||
new-session
|
new-session
|
||||||
|
|
||||||
bind v split-window -h
|
bind -N "Split the pane into two, left and right" v split-window -h
|
||||||
bind s split-window -v
|
bind -N "Split the pane into two, top and bottom" s split-window -v
|
||||||
|
|
||||||
|
|
||||||
set -g status-keys vi
|
set -g status-keys vi
|
||||||
|
|
Loading…
Reference in a new issue