# remap prefix from 'Ctrl-b' to 'Alt-a' # unbind C-b # set-option -g prefix M-a # bind-key M-a send-prefix # use mouser to scroll setw -g mouse on # resolve issue whant escape works like meta(ALT) key set -s escape-time 0 # Select pane vim-style bind h select-pane -L # left bind j select-pane -D # Down bind k select-pane -U # Up bind l select-pane -R # Right bind -r M-h resize-pane -L 5 bind -r M-j resize-pane -D 5 bind -r M-k resize-pane -U 5 bind -r M-l resize-pane -R 5 # previous window without prefix (-n) bind-key -n M-h previous-window # next window without prefix (-n) bind-key -n M-l next-window bind-key tab last-window bind-key a set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}" # increase buffer limit to N set-option -g history-limit 1000000 # need to detect changes in vim/nvim files on the fly set-option -g focus-events on # Easy config reload bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." # Show tree instead of clock bind-key t choose-tree # vi is good setw -g mode-keys vi set -g status-keys vi # Start windows and panes at 1, not 0 set -g base-index 1 setw -g pane-base-index 1 set-window-option -g pane-base-index 1 set-option -g renumber-windows on # Set color for current tab: # set-window-option -g window-status-current-bg red # set -g window-status-current-style fg=colour7,bg=colour23 set-option -g status-position bottom # set -g pane-border-status bottom # Vi copypaste mode # bind-key -t vi-copy 'v' begin-selection # bind-key -t vi-copy 'y' copy-selection # starting with tmux version 2.6 this changes to: bind-key -T copy-mode-vi 'C-v' send-keys -X rectangle-toggle \; send -X begin-selection bind-key -T copy-mode-vi 'v' send -X begin-selection bind-key -T copy-mode-vi 'y' send -X copy-selction # set-option -g default-shell /bin/zsh # set tmux to open new window, pane etc with current path bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}" # set-option -g default-terminal "xterm-256color" # set-option -ga terminal-overrides ",xterm-kitty:cnorm=\E[?12h\E[?25h" set -g default-terminal "tmux-256color" set -ag terminal-overrides ",xterm-256color:RGB"