⚙️ config(tmux): bunch of new bindings and some changes to existing ones

This commit is contained in:
Sergio Laín 2024-08-24 01:26:23 +02:00
parent 8e6f3d8705
commit de907c8f7d
No known key found for this signature in database
GPG key ID: 8429B2EE312F8150

View file

@ -4,7 +4,7 @@ set -g prefix M-Space
bind Space send-prefix bind Space send-prefix
# Config reload # Config reload
bind R source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded" bind C-r source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded"
# Vim mode # Vim mode
setw -g mode-keys vi setw -g mode-keys vi
@ -17,27 +17,31 @@ bind - split-window -vc "#{pane_current_path}"
# Maintain the same path when creating a new window # Maintain the same path when creating a new window
bind c new-window -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}"
bind-key C command-prompt -p "Name of new window: " "new-window -c '#{pane_current_path}' -n '%%'" bind-key C command-prompt -p "Enter window name:" "new-window -n '%%'"
# Move to the next and prev window # Move to the next and prev window
bind-key l next-window bind-key l next-window
bind-key h previous-window bind-key h previous-window
bind-key -n M-l next-window
bind-key -n M-h previous-window
# Change window name # Change window name
bind-key r command-prompt -I "#W" "rename-window '%%'" bind-key r command-prompt -I "#W" "rename-window '%%'"
bind-key R command-prompt -I "#W" "rename-session '%%'"
# Move to the next and prev session # Move to the next and prev session
bind j switch-client -n bind j switch-client -n
bind k switch-client -p bind k switch-client -p
# Close a window # Close a window
bind-key Q confirm-before kill-window bind-key Q kill-window
# Close a pane # Close a pane
bind-key q confirm-before kill-pane bind-key q kill-pane
# Close a session # Close a session
bind-key M-q confirm-before kill-session bind-key M-q kill-session
# Swap windows # Swap windows
bind -r "<" swap-window -d -t -1 bind -r "<" swap-window -d -t -1