From 93b93b30b88439d74d140e2fd0ddf1a741026d7d Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Sat, 18 Jul 2026 17:22:48 -0700 Subject: [PATCH] Fix Ctrl+J in claude code --- config/tmux.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/tmux.conf b/config/tmux.conf index f413156..44f7b47 100644 --- a/config/tmux.conf +++ b/config/tmux.conf @@ -32,8 +32,12 @@ bind l select-pane -R # Smart pane switching with awareness of vim splits is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' +# Claude Code also wants its own use of C-j (insert newline), same as vim +# wants C-h/j/k/l for its own window navigation -- forward it raw instead of +# letting tmux swallow it for pane-switching. +is_vim_or_claude='echo "#{pane_current_command}" | grep -iqE "(^|\/)(g?(view|n?vim?)(diff)?|claude)$"' bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" -bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +bind -n C-j if-shell "$is_vim_or_claude" "send-keys C-j" "select-pane -D" bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" bind -n 'C-\' if-shell "$is_vim" "send-keys 'C-\\'" "select-pane -l"