tmux.conf 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. # enable mouse support
  6. set -g mouse on
  7. # ... and enable mouse mode toggling
  8. bind m run "\
  9. tmux show-options -g | grep -q \"mouse on\";\
  10. if [ \$? -eq 0 ];\
  11. then toggle=off;\
  12. else\
  13. toggle=on;\
  14. fi;\
  15. tmux display-message \"mouse is now: \$toggle\";\
  16. tmux set-option -g mouse \$toggle;"
  17. # required for vim-clipboard integration
  18. set -g focus-events on
  19. # allow scroll while in input mode
  20. bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
  21. # try to use correct colors
  22. set -g default-terminal screen-256color
  23. # reload tmux config
  24. bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
  25. # rebind some clear history command
  26. bind C-l send-keys C-l \; clear-history
  27. # reuse directory
  28. bind '"' split-window -c "#{pane_current_path}"
  29. bind % split-window -h -c "#{pane_current_path}"
  30. bind c new-window -c "#{pane_current_path}"
  31. # Use vim keybindings in copy mode
  32. setw -g mode-keys vi
  33. # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
  34. run '~/.dotfiles/external/tpm/tpm'