From 155a126e03a084e871ec7570ef5e2cd61dcff3c2 Mon Sep 17 00:00:00 2001 From: m1ngsama Date: Wed, 25 Jun 2025 11:16:02 +0800 Subject: [PATCH] updated tmux keybinding --- tmux/macos.conf | 1 + tmux/tmux.conf | 20 +++++++++++++++++--- tmux/utility.conf | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tmux/macos.conf b/tmux/macos.conf index 23db35a..914c951 100644 --- a/tmux/macos.conf +++ b/tmux/macos.conf @@ -4,3 +4,4 @@ set-option -g default-command "which reattach-to-user-namespace > /dev/null && r # Undercurl 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 + diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 3c37f56..5c178d3 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -12,16 +12,30 @@ set-option -g focus-events on set-window-option -g mode-keys vi -#bind t send-key C-t +#bind a send-key C-t # Reload settings bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!" # Open current directory bind o run-shell "open '#{pane_current_path}'" 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 -bind-key -n C-S-Left swap-window -t -1 \; previous-window -bind-key -n C-S-Right swap-window -t +1 \; next-window +bind -r H resize-pane -L 5 +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 diff --git a/tmux/utility.conf b/tmux/utility.conf index 0cf0292..1d63e94 100644 --- a/tmux/utility.conf +++ b/tmux/utility.conf @@ -1,2 +1,3 @@ # Display lazygit bind -r g display-popup -d '#{pane_current_path}' -w80% -h80% -E lazygit +