Fix Ctrl+J in claude code
This commit is contained in:
+5
-1
@@ -32,8 +32,12 @@ bind l select-pane -R
|
|||||||
|
|
||||||
# Smart pane switching with awareness of vim splits
|
# Smart pane switching with awareness of vim splits
|
||||||
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
|
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-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-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-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"
|
bind -n 'C-\' if-shell "$is_vim" "send-keys 'C-\\'" "select-pane -l"
|
||||||
|
|||||||
Reference in New Issue
Block a user