# C-b already in use by vim for page up. Use screen's prefix. set -g prefix C-a unbind C-b bind C-a send-prefix # Make ^a a send ^a (Useful in minicom) bind a send-prefix # No delay for escape key press (vim mode changes) set -sg escape-time 0 # Copy mode more intuitive for vim users, use v and y # From https://dev.to/iggredible/the-easy-way-to-copy-text-in-tmux-319g # See https://ianthehenry.com/posts/how-to-configure-tmux/ for copy-pipe tips. bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi C-v send -X rectangle-toggle bind -T copy-mode-vi y send -X copy-selection-and-cancel # Vim style pane splitting bind v split-window -h bind s split-window -v # Vim style pane selection bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R # pane sizing with capital letters bind -r H resize-pane -L bind -r J resize-pane -D bind -r K resize-pane -U bind -r L resize-pane -R # Use Alt-vim keys without prefix key to switch panes bind -n M-h select-pane -L bind -n M-j select-pane -D bind -n M-k select-pane -U bind -n M-l select-pane -R # Use Alt-arrow keys without prefix key to switch panes bind -n M-Left select-pane -L bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D # Use prefix-! to break-pane a pane into a new window. # Use these to join another pane to this window (choosing which pane). bind-key S choose-window 'join-pane -v -s "%%"' bind-key V choose-window 'join-pane -h -s "%%"' # Use Tab to rotate full-screen panes like I do vim buffers bind -r Tab select-pane -t .+1 \; resize-pane -Z # Theme set -g status-keys vi set -g status-fg white set -g focus-events on set -g status-bg colour235 set -g status-left-length 10 set -g status-left "#[fg=green]#{?#{!=:#{window_panes},1},pane #P/#{window_panes},}#[default]" set -g status-justify centre set -g status-right '#[fg=green]%m/%d %H:%M#[default]' setw -g mode-keys vi setw -g automatic-rename off setw -g aggressive-resize #set -g allow-rename on ## ssh'ed servers may rename window to PS1, duplicating path #setw -g window-status-current-format '#[fg=yellow]#I:#F:#T:.../#{b:pane_current_path}#[default]' setw -g window-status-current-format '#{?#{!=:#{session_windows},1},#I:#W:,}#[fg=yellow]#{?window_zoomed_flag,Z:,}#{s\/home/dblume\~\:pane_current_path}#[default]' setw -g window-status-format '#[fg=colour241]#I:#W#[default]' # This allows neovim's hi htmlItalic (also used by markdown) to use italic font set -g default-terminal "tmux" # prefix, C-Arrow doesn't work from PuTTY. Needs TERM to be xterm set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"