tmux.conf (1865B) - raw


      1 # if you look at the man page to understand commands, search for:
      2 #   - set-option instead of set
      3 #   - bind-key instead of bind
      4 #   - send-keys instead of send
      5 
      6 # fix issues
      7 set -g default-terminal "tmux-256color" # not sure if this is needed
      8 set -ga terminal-overrides ',*:Tc' # fix to enble 256 color
      9 set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # fix cursor shape in neovim
     10 set -s escape-time 0    # stop delay before passing escape keypress to vim
     11 
     12 # sane defaults
     13 set -g prefix C-a
     14 set -g history-limit 100000     # number of lines stored for scroll
     15 set -g base-index 1             # windows indexed at 1
     16 set -g pane-base-index 1        # panes indexed at 1
     17 bind , command-prompt "rename-window '%%'"  # when renaming windows, don't suggest previous name
     18 
     19 # status bar
     20 set -g status-style "fg=green,bg=default"     # more discreet status bar
     21 set -g message-style "fg=black,bg=green"
     22 set -g window-status-current-style "fg=black,bg=green"
     23 set -g window-status-last-style "underscore,italics"
     24 set -g status-right "#(whoami) @ #h"   # get rid of right part of status bar
     25 
     26 # shortcuts
     27 bind C-a copy-mode
     28 bind a last-window
     29 bind r source-file "~/.config/tmux/tmux.conf" \; display "Configuration reloaded"
     30 
     31 # vim keybindings for copy mode
     32 set -g mode-keys vi     # vi keybindings
     33 bind -T copy-mode-vi v send -X begin-selection
     34 bind -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -i -selection clipboard"
     35 bind -T copy-mode-vi r send -X rectangle-toggle
     36 
     37 # switch / and ? bindings for search, also use incremental search
     38 bind -T copy-mode-vi / command-prompt -i -p "(search up)" "send -X search-backward-incremental '%%%'"
     39 bind -T copy-mode-vi ? command-prompt -i -p "(search down)" "send -X search-forward-incremental '%%%'"
     40 
     41 # vim keybindings for moving panes
     42 bind h select-pane -L
     43 bind j select-pane -D
     44 bind k select-pane -U
     45 bind l select-pane -R