Add easier tmux pane controls
This commit is contained in:
1 parent
ae7365f937
commit
ca19e2dead
5 files changed
+23
-1
No files matched your search
@@ -21,5 +21,8 @@ decorations = "None"
|
||||
bindings = [
|
||||
{ key = "Insert", mods = "Shift", action = "Paste" },
|
||||
{ key = "Insert", mods = "Control", action = "Copy" },
|
||||
{ key = "Return", mods = "Shift", chars = "\u001B\r" }
|
||||
# Send Shift+Return as CSI-u so TUIs can distinguish it from Return without treating it as Alt+Return.
|
||||
{ key = "Return", mods = "Shift", chars = "\u001B[13;2u" },
|
||||
# Legacy encoding sends Alt+Shift+Return the same as Alt+Return; send CSI-u so tmux can match M-S-Enter.
|
||||
{ key = "Return", mods = "Alt|Shift", chars = "\u001B[13;4u" }
|
||||
]
|
||||
@@ -17,3 +17,9 @@ blink=no
|
||||
clipboard-copy=Control+Insert
|
||||
primary-paste=none
|
||||
clipboard-paste=Shift+Insert
|
||||
|
||||
[text-bindings]
|
||||
# Send Shift+Return as CSI-u so TUIs can distinguish it from Return.
|
||||
\x1b[13;2u=Shift+Return
|
||||
# Send Alt+Shift+Return as CSI-u so tmux can match M-S-Enter.
|
||||
\x1b[13;4u=Mod1+Shift+Return
|
||||
@@ -25,6 +25,10 @@ shell-integration-features = no-cursor,ssh-env
|
||||
# Keyboard bindings
|
||||
keybind = shift+insert=paste_from_clipboard
|
||||
keybind = control+insert=copy_to_clipboard
|
||||
# Send Shift+Enter as CSI-u so TUIs can distinguish it from Enter.
|
||||
keybind = shift+enter=csi:13;2u
|
||||
# Legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter.
|
||||
keybind = alt+shift+enter=csi:13;4u
|
||||
keybind = super+control+shift+alt+arrow_down=resize_split:down,100
|
||||
keybind = super+control+shift+alt+arrow_up=resize_split:up,100
|
||||
keybind = super+control+shift+alt+arrow_left=resize_split:left,100
|
||||
|
||||
@@ -13,6 +13,10 @@ confirm_os_window_close 0
|
||||
# Keybindings
|
||||
map ctrl+insert copy_to_clipboard
|
||||
map shift+insert paste_from_clipboard
|
||||
# Send Shift+Enter as CSI-u so TUIs can distinguish it from Enter.
|
||||
map shift+enter send_text all \e[13;2u
|
||||
# Kitty legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter.
|
||||
map alt+shift+enter send_text all \e[13;4u
|
||||
|
||||
# Allow remote access
|
||||
allow_remote_control yes
|
||||
|
||||
@@ -12,6 +12,10 @@ bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
|
||||
# Pane Controls
|
||||
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-Escape kill-pane
|
||||
|
||||
bind h split-window -v -c "#{pane_current_path}"
|
||||
bind v split-window -h -c "#{pane_current_path}"
|
||||
bind x kill-pane
|
||||
@@ -72,6 +76,7 @@ setw -g aggressive-resize on
|
||||
set -g detach-on-destroy off
|
||||
set -g extended-keys on
|
||||
set -g extended-keys-format csi-u
|
||||
set -g terminal-features[3] "xterm-kitty:extkeys"
|
||||
set -sg escape-time 10
|
||||
|
||||
# Status bar
|
||||
|
||||
Reference in new issue
Block a user