# Rebind prefix to ` unbind C-b set-option -g prefix ` bind-key ` send-prefix # Rebind split to - and | unbind '"' unbind % bind | split-window -h bind - split-window -v # Bind config reloading bind r source-file ~/.tmux.conf \; display-message 'Config reloaded...' # Escape delay is anoying in vim set -s escape-time 0 # Smart pane switching with awareness of Vim splits. # See: https://github.com/christoomey/vim-tmux-navigator is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" bind-key -T copy-mode-vi C-h select-pane -L bind-key -T copy-mode-vi C-j select-pane -D bind-key -T copy-mode-vi C-k select-pane -U bind-key -T copy-mode-vi C-l select-pane -R bind-key -T copy-mode-vi C-\ select-pane -l # Mouse set -g mouse on # tmux-256-color is badly supported on some system, especially servers so we pretend to base screen instead set -g default-terminal 'screen-256color' set -ga terminal-overrides ',screen-256color:Tc' # Window set -g base-index 1 # Pane setw -g pane-base-index 1 setw -g allow-rename off set -g pane-border-fg 'colour7' set -g pane-active-border-fg 'colour5' # Status bar set -g status-position top set -g status-bg 'default' setw -g window-status-fg 'colour7' setw -g window-status-bg 'default' setw -g window-status-format ' #I:#W' setw -g window-status-current-fg 'colour15' setw -g window-status-current-bg 'default' setw -g window-status-current-format ' [#I:#W]' setw -g window-status-activity-attr bold set -g status-left-fg 'colour7' set -g status-left '{#[fg=colour6]#S#[fg=default]}' set -g status-right-length 100 set -g status-right-fg 'colour7' set -g status-right '#(__tmux_status)' # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm'