1
0

tmux.conf 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # List of plugins
  2. set -g @plugin 'tmux-plugins/tpm'
  3. set -g @plugin 'tmux-plugins/tmux-sensible'
  4. set -g @plugin 'tmux-plugins/tmux-resurrect'
  5. set -g @plugin 'christoomey/vim-tmux-navigator'
  6. set -g @plugin 'tmux-plugins/tmux-yank'
  7. # enable mouse support
  8. set -g mouse on
  9. # ... and enable mouse mode toggling
  10. bind m run "\
  11. tmux show-options -g | grep -q \"mouse on\";\
  12. if [ \$? -eq 0 ];\
  13. then toggle=off;\
  14. else\
  15. toggle=on;\
  16. fi;\
  17. tmux display-message \"mouse is now: \$toggle\";\
  18. tmux set-option -g mouse \$toggle;"
  19. # required for vim-clipboard integration
  20. set -g focus-events on
  21. # allow scroll while in input mode
  22. bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
  23. # try to use correct colors
  24. set -g default-terminal screen-256color
  25. #
  26. set-option -sa terminal-overrides ',xterm-256colo:RGB'
  27. # reload tmux config
  28. bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
  29. # rebind some clear history command
  30. bind C-l send-keys C-l \; clear-history
  31. # 500k lines of history...
  32. set-option -g history-limit 500000
  33. # reuse directory
  34. bind '"' split-window -c "#{pane_current_path}"
  35. bind % split-window -h -c "#{pane_current_path}"
  36. bind c new-window -c "#{pane_current_path}"
  37. # Use vim keybindings in copy mode
  38. set-window-option -g mode-keys vi
  39. unbind -T copy-mode-vi MouseDragEnd1Pane
  40. bind-key -T copy-mode-vi y send-keys -X copy-selection
  41. # And do not exit copy mode after copying
  42. bind-key -T copy-mode-vi Enter send-keys -X copy-selection
  43. # prevent delayed escape key
  44. set -s escape-time 0
  45. # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
  46. run '~/.dotfiles/external/tpm/tpm'