Re-add R for reloading the user tmux.conf, use F1 and F2 for command and keyboard help, add Alt+? for searching up, and tweak the comments

This commit is contained in:
Kevin MacMartin 2024-04-05 16:01:09 -04:00
parent 5835869a28
commit e2214dbb88
3 changed files with 32 additions and 23 deletions

View file

@ -32,12 +32,12 @@
| `#` | Rename the current window | | `#` | Rename the current window |
| `<Space>` and `<Ctrl><Space>` | Move to the previously selected pane and window | | `<Space>` and `<Ctrl><Space>` | Move to the previously selected pane and window |
| `` ` `` | Toggle synchronized input between the panes on the current window | | `` ` `` | Toggle synchronized input between the panes on the current window |
| `r` | Reload /etc/tmux.conf | | `r` and `R` | Reload /etc/tmux.conf and ~/.tmux.conf |
| `?` and `/` | Show help for available key binding help and command help | | `F1` and `F2` | Show help for available commands and keyboard bindings |
| `W` | Write scrollback buffer to file | | `W` | Write scrollback buffer to file |
| `V` | Enter **copy mode** | | `V` | Enter **copy mode** |
| `<Ctrl>p` | Paste from the copy buffer | | `<Ctrl>p` | Paste from the copy buffer |
| `N` and `P` | Move to the next and previous session | | `P` and `N` | Move to the previous and next session |
### Without Prefix ### Without Prefix
@ -47,6 +47,7 @@
| `<Alt>N` and `<Alt>P` | Switch to the next and previous window | | `<Alt>N` and `<Alt>P` | Switch to the next and previous window |
| `<Ctrl><Alt>N` and `<Ctrl><Alt>P` | Swap the current window with the next and previous window | | `<Ctrl><Alt>N` and `<Ctrl><Alt>P` | Swap the current window with the next and previous window |
| `Alt-[0-9]` | Switch to the window with the respective index | | `Alt-[0-9]` | Switch to the window with the respective index |
| `Alt-?` | Start searching up |
### Copy Mode ### Copy Mode

View file

@ -1,7 +1,7 @@
# #
# DARKCLOUD TMUX CONFIG: tmux.conf # DARKCLOUD TMUX CONFIG: tmux.conf
# #
# Maintainer: Prurigro (prurigro-at-gmail-dot-com) # Maintainer: Kevin MacMartin (prurigro-at-gmail-dot-com)
# Website: https://github.com/prurigro/darkcloud-tmuxconfig # Website: https://github.com/prurigro/darkcloud-tmuxconfig
# #
# License: MIT # License: MIT
@ -27,7 +27,7 @@ bind Space send-prefix
# general # general
set-option -g default-terminal "tmux-256color" # set $TERM variable so programs know how to behave set-option -g default-terminal "tmux-256color" # set $TERM variable so programs know how to behave
set-option -ag terminal-overrides ",alacritty:RGB,xterm-256color:RGB,gnome*:RGB" # enable truecolor where supported set-option -ag terminal-overrides ",alacritty:RGB,xterm-256color:RGB,gnome*:RGB" # enable truecolor where supported
set-option -g base-index 1 # start counting windows at 1 instead of 0 (for more logical keboard-switching) set-option -g base-index 1 # start counting windows at 1 instead of 0 (for more logical keyboard-switching)
set-option -g pane-base-index 1 # start counting panes at 1 instead of 0 set-option -g pane-base-index 1 # start counting panes at 1 instead of 0
set-option -g renumber-windows on # when a window is closed, renumber the remaining windows set-option -g renumber-windows on # when a window is closed, renumber the remaining windows
set-option -g set-titles on # attempt to set the terminal title set-option -g set-titles on # attempt to set the terminal title
@ -82,15 +82,16 @@ bind "#" command-prompt -I '#W' "rename-window '%%'"
bind Space last-window bind Space last-window
bind C-Space last-pane bind C-Space last-pane
# #
# ` to synchronous panes # ` to synchronize panes
bind ` set-window-option synchronize-panes \; display "synchronize-panes: toggled" bind ` set-window-option synchronize-panes \; display "synchronize-panes: toggled"
# #
# r to reload /etc/tmux.conf # r to reload /etc/tmux.conf and R to reload ~/.tmux.conf
bind r source-file /etc/tmux.conf \; display "configuration reloaded" bind r source-file /etc/tmux.conf \; display "system configuration reloaded"
bind R source-file ~/.tmux.conf \; display "local configuration reloaded"
# #
# ? and / to show keyboard and command help # F1 and F2 to show the list of commands and keyboard bindings
bind ? list-keys bind F1 list-commands
bind / list-commands bind F2 list-keys
# #
# W to save scrollback to file # W to save scrollback to file
bind-key W command-prompt -p 'write scrollback to file:' -I '~/' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer' bind-key W command-prompt -p 'write scrollback to file:' -I '~/' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
@ -107,9 +108,9 @@ bind Down select-pane -D
bind Left select-pane -L bind Left select-pane -L
bind Right select-pane -R bind Right select-pane -R
# #
# bind N and P to next and previous session # P and N to navigate to the previous and next session
bind N switch-client -n
bind P switch-client -p bind P switch-client -p
bind N switch-client -n
# #
# (without prefix) <alt><shift> + up,down,left and right to navigate between panes # (without prefix) <alt><shift> + up,down,left and right to navigate between panes
bind -n M-S-Up select-pane -U bind -n M-S-Up select-pane -U
@ -137,6 +138,9 @@ bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9 bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 10 bind -n M-0 select-window -t 10
# #
# (without prefix) <alt>? to start searching
bind -n M-? copy-mode \; send-key ?
#
# (copy mode) v,y and escape to select, copy and cancel # (copy mode) v,y and escape to select, copy and cancel
bind -Tcopy-mode-vi v send -X begin-selection bind -Tcopy-mode-vi v send -X begin-selection
bind -Tcopy-mode-vi y send -X copy-selection bind -Tcopy-mode-vi y send -X copy-selection

View file

@ -1,7 +1,7 @@
# #
# DARKCLOUD TMUX CONFIG: tmux.conf # DARKCLOUD TMUX CONFIG: tmux.conf
# #
# Maintainer: Prurigro (prurigro-at-gmail-dot-com) # Maintainer: Kevin MacMartin (prurigro-at-gmail-dot-com)
# Website: https://github.com/prurigro/darkcloud-tmuxconfig # Website: https://github.com/prurigro/darkcloud-tmuxconfig
# #
# License: MIT # License: MIT
@ -27,7 +27,7 @@ bind Space send-prefix
# general # general
set-option -g default-terminal "tmux-256color" # set $TERM variable so programs know how to behave set-option -g default-terminal "tmux-256color" # set $TERM variable so programs know how to behave
set-option -ag terminal-overrides ",alacritty:RGB,xterm-256color:RGB,gnome*:RGB" # enable truecolor where supported set-option -ag terminal-overrides ",alacritty:RGB,xterm-256color:RGB,gnome*:RGB" # enable truecolor where supported
set-option -g base-index 1 # start counting windows at 1 instead of 0 (for more logical keboard-switching) set-option -g base-index 1 # start counting windows at 1 instead of 0 (for more logical keyboard-switching)
set-option -g pane-base-index 1 # start counting panes at 1 instead of 0 set-option -g pane-base-index 1 # start counting panes at 1 instead of 0
set-option -g renumber-windows on # when a window is closed, renumber the remaining windows set-option -g renumber-windows on # when a window is closed, renumber the remaining windows
set-option -g set-titles on # attempt to set the terminal title set-option -g set-titles on # attempt to set the terminal title
@ -82,15 +82,16 @@ bind "#" command-prompt -I '#W' "rename-window '%%'"
bind Space last-window bind Space last-window
bind C-Space last-pane bind C-Space last-pane
# #
# ` to synchronous panes # ` to synchronize panes
bind ` set-window-option synchronize-panes \; display "synchronize-panes: toggled" bind ` set-window-option synchronize-panes \; display "synchronize-panes: toggled"
# #
# r to reload /etc/tmux.conf # r to reload /etc/tmux.conf and R to reload ~/.tmux.conf
bind r source-file /etc/tmux.conf \; display "configuration reloaded" bind r source-file /etc/tmux.conf \; display "system configuration reloaded"
bind R source-file ~/.tmux.conf \; display "local configuration reloaded"
# #
# ? and / to show keyboard and command help # F1 and F2 to show the list of commands and keyboard bindings
bind ? list-keys bind F1 list-commands
bind / list-commands bind F2 list-keys
# #
# W to save scrollback to file # W to save scrollback to file
bind-key W command-prompt -p 'write scrollback to file:' -I '~/' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer' bind-key W command-prompt -p 'write scrollback to file:' -I '~/' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
@ -107,9 +108,9 @@ bind Down select-pane -D
bind Left select-pane -L bind Left select-pane -L
bind Right select-pane -R bind Right select-pane -R
# #
# bind N and P to next and previous session # P and N to navigate to the previous and next session
bind N switch-client -n
bind P switch-client -p bind P switch-client -p
bind N switch-client -n
# #
# (without prefix) <alt><shift> + up,down,left and right to navigate between panes # (without prefix) <alt><shift> + up,down,left and right to navigate between panes
bind -n M-S-Up select-pane -U bind -n M-S-Up select-pane -U
@ -137,6 +138,9 @@ bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9 bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 10 bind -n M-0 select-window -t 10
# #
# (without prefix) <alt>? to start searching
bind -n M-? copy-mode \; send-key ?
#
# (copy mode) v,y and escape to select, copy and cancel # (copy mode) v,y and escape to select, copy and cancel
bind -Tcopy-mode-vi v send -X begin-selection bind -Tcopy-mode-vi v send -X begin-selection
bind -Tcopy-mode-vi y send -X copy-selection bind -Tcopy-mode-vi y send -X copy-selection