From 1dbc6d49376c973d4dba827be8dcf1df87d8dc21 Mon Sep 17 00:00:00 2001 From: David Ibia Date: Thu, 9 Jan 2025 01:27:56 +0100 Subject: [PATCH] fix(tmux.conf): change base index to 1 for consistency with other tools feat(tmux.conf): add support for attach-session command to allow attaching to a session from any directory refactor(tmux.conf): reorganize bindings and commands for better readability --- .tmux.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.tmux.conf b/.tmux.conf index cd82e4b..de309e6 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -28,6 +28,9 @@ unbind -T copy-mode-vi MouseDragEnd1Pane unbind % bind | split-window -h -c '#{pane_current_path}' +# Set base index to 1 +set -g base-index 1 +setw -g pane-base-index 1 # Set kill pane to Shift + Option + X bind -n M-X kill-pane @@ -36,6 +39,9 @@ bind -n M-X kill-pane unbind '"' bind - split-window -v -c '#{pane_current_path}' +unbind 'C' +bind C attach-session -c "#{pane_current_path}" + # Setting up window movement with leader key + Left/Right arrow bind Left swap-window -t -1\; select-window -t -1 bind Right swap-window -t +1\; select-window -t +1