You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.3 KiB

  1. # same prefix as `screen`
  2. set -g prefix C-a
  3. unbind C-b
  4. # 0-indexed is not keyboard friendly
  5. set -g base-index 1
  6. set -g pane-base-index 1
  7. # misc features
  8. set -s escape-time 1
  9. setw -g mode-keys vi
  10. # reload
  11. bind r source-file ~/.tmux.conf \; display "Reloaded!"
  12. # send C-a
  13. bind C-a send-prefix
  14. # status bar
  15. #
  16. set -g status-utf8 on
  17. set -g monitor-activity on
  18. set -g visual-activity on
  19. # Toggle mouse on with ^A m
  20. bind m \
  21. set -g mode-mouse on \;\
  22. set -g mouse-resize-pane on \;\
  23. set -g mouse-select-pane on \;\
  24. set -g mouse-select-window on \;\
  25. display 'Mouse: ON'
  26. # Toggle mouse off with ^A M
  27. bind M \
  28. set -g mode-mouse off \;\
  29. set -g mouse-resize-pane off \;\
  30. set -g mouse-select-pane off \;\
  31. set -g mouse-select-window off \;\
  32. display 'Mouse: OFF'
  33. # sessions
  34. #
  35. bind -r ( switch-client -p
  36. bind -r ) switch-client -n
  37. # windows
  38. #
  39. bind -r b select-window -t :-
  40. bind -r n select-window -t :+
  41. # panes
  42. #
  43. bind | split-window -h -c "#{pane_current_path}"
  44. bind - split-window -v -c "#{pane_current_path}"
  45. bind h select-pane -L
  46. bind j select-pane -D
  47. bind k select-pane -U
  48. bind l select-pane -R
  49. bind -r H resize-pane -L 5
  50. bind -r J resize-pane -D 5
  51. bind -r K resize-pane -U 5
  52. bind -r L resize-pane -R 5
  53. # buffers
  54. #
  55. bind = paste-buffer
  56. bind -t vi-copy 'v' begin-selection
  57. bind -t vi-copy 'y' copy-selection