updated tmux keybinding

This commit is contained in:
m1ngsama 2025-06-25 11:16:02 +08:00
parent 2f7a73708e
commit 155a126e03
3 changed files with 19 additions and 3 deletions

View file

@ -4,3 +4,4 @@ set-option -g default-command "which reattach-to-user-namespace > /dev/null && r
# Undercurl # Undercurl
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0 set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0

View file

@ -12,16 +12,30 @@ set-option -g focus-events on
set-window-option -g mode-keys vi set-window-option -g mode-keys vi
#bind t send-key C-t #bind a send-key C-t
# Reload settings # Reload settings
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!" bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"
# Open current directory # Open current directory
bind o run-shell "open '#{pane_current_path}'" bind o run-shell "open '#{pane_current_path}'"
bind -r e kill-pane -a bind -r e kill-pane -a
# Select window
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Moving window # Moving window
bind-key -n C-S-Left swap-window -t -1 \; previous-window bind -r H resize-pane -L 5
bind-key -n C-S-Right swap-window -t +1 \; next-window bind -r J resize-pane -D 3
bind -r K resize-pane -U 3
bind -r L resize-pane -R 5
# Split window
bind | split-window -h # Ctrl-a |
bind - split-window -v # Ctrl-a -
bind x kill-pane # Ctrl-a x
bind X kill-window # Ctrl-a X
#### basic settings #### basic settings

View file

@ -1,2 +1,3 @@
# Display lazygit # Display lazygit
bind -r g display-popup -d '#{pane_current_path}' -w80% -h80% -E lazygit bind -r g display-popup -d '#{pane_current_path}' -w80% -h80% -E lazygit