Add Alt+esc to close a pane too
This commit is contained in:
@@ -15,6 +15,8 @@ bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
|||||||
# Pane Controls
|
# Pane Controls
|
||||||
bind -n M-Enter split-window -v -c "#{pane_current_path}"
|
bind -n M-Enter split-window -v -c "#{pane_current_path}"
|
||||||
bind -n M-S-Enter split-window -h -c "#{pane_current_path}"
|
bind -n M-S-Enter split-window -h -c "#{pane_current_path}"
|
||||||
|
bind -n M-Escape kill-pane
|
||||||
|
|
||||||
bind h split-window -v -c "#{pane_current_path}"
|
bind h split-window -v -c "#{pane_current_path}"
|
||||||
bind v split-window -h -c "#{pane_current_path}"
|
bind v split-window -h -c "#{pane_current_path}"
|
||||||
bind x kill-pane
|
bind x kill-pane
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
echo "Add Alt+Enter and Alt+Shift+Enter split keybindings to tmux"
|
echo "Add Alt+Enter split and Alt+Escape close keybindings to tmux"
|
||||||
|
|
||||||
tmux_config="$HOME/.config/tmux/tmux.conf"
|
tmux_config="$HOME/.config/tmux/tmux.conf"
|
||||||
|
|
||||||
@@ -15,6 +15,11 @@ if [[ -f $tmux_config ]]; then
|
|||||||
changed=1
|
changed=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! grep -qxF 'bind -n M-Escape kill-pane' "$tmux_config"; then
|
||||||
|
printf 'bind -n M-Escape kill-pane\n' >>"$tmux_config"
|
||||||
|
changed=1
|
||||||
|
fi
|
||||||
|
|
||||||
if (( changed )); then
|
if (( changed )); then
|
||||||
omarchy-restart-tmux
|
omarchy-restart-tmux
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user