tmux.conf 1.5 KB

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