diff --git a/home/.tmux.conf b/home/.tmux.conf index f201d16..14ebe4f 100644 --- a/home/.tmux.conf +++ b/home/.tmux.conf @@ -1,7 +1,8 @@ -# Set prefix to ctrl-a, freeing up ctrl-b -set-option -g prefix C-a +# Set prefix to ctrl-space, freeing up ctrl-a for shell line-start +set-option -g prefix C-Space unbind-key C-b -bind-key C-a send-prefix +unbind-key C-a +bind-key C-Space send-prefix ### Settings @@ -16,6 +17,11 @@ if-shell 'infocmp -x tmux-256color >/dev/null 2>&1' \ # Truecolor support for common terminal types set-option -as terminal-features ',xterm-256color:RGB,screen-256color:RGB,tmux-256color:RGB' +# Extended key sequences (CSI u) — forwards Shift+Enter etc. to apps +set-option -g extended-keys always +set-option -s extended-keys-format csi-u +set-option -as terminal-features ',xterm-256color:extkeys,tmux-256color:extkeys' + # Keep a lot of scrollback buffer set-option -g history-limit 50000 @@ -59,7 +65,7 @@ set-option -g allow-passthrough on bind-key r source-file ~/.tmux.conf \; display-message "Reloaded tmux.conf" # Toggle last active window -bind-key C-a last-window +bind-key C-Space last-window ## Windows @@ -93,8 +99,10 @@ bind-key -r L resize-pane -R 5 # Begin selection bind-key -T copy-mode-vi v send -X begin-selection +# Select line +bind-key -T copy-mode-vi V send -X select-line # Toggle rectangle selection -bind-key -T copy-mode-vi V send -X rectangle-toggle +bind-key -T copy-mode-vi C-v send -X rectangle-toggle # Yank selection and exit copy mode bind-key -T copy-mode-vi y send -X copy-selection-and-cancel @@ -139,7 +147,7 @@ set-window-option -g window-status-separator "" set-window-option -g window-status-style "fg=colour8" # Active window title (base0B green bg, consistent across base16/base24) -set-window-option -g window-status-current-style "bg=colour2,fg=colour7,bold" +set-window-option -g window-status-current-style "bg=colour2,fg=colour0,bold" # Activity and bell indicators set-window-option -g window-status-activity-style "fg=colour3,bold"