tmux.conf 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #Prefix is Ctrl-a
  2. set -g prefix C-a
  3. bind C-a send-prefix
  4. unbind C-b
  5. setw -g utf8 on
  6. setw -g status-utf8 on
  7. # set -g default-command "bash -l"
  8. set -sg escape-time 1
  9. set -g base-index 1
  10. setw -g pane-base-index 1
  11. #Mouse works as expected
  12. setw -g mode-mouse on
  13. set -g mouse-select-pane on
  14. set -g mouse-resize-pane on
  15. set -g mouse-select-window on
  16. setw -g monitor-activity on
  17. set -g visual-activity on
  18. set -g mode-keys vi
  19. set -g history-limit 10000
  20. # y and p as in vim
  21. bind Escape copy-mode
  22. unbind p
  23. bind p paste-buffer
  24. bind -t vi-copy 'v' begin-selection
  25. bind -t vi-copy 'y' copy-selection
  26. #bind -t vi-copy 'Space' halfpage-down
  27. #bind -t vi-copy 'Bspace' halfpage-up
  28. # extra commands for interacting with the ICCCM clipboard
  29. bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
  30. bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
  31. # easy-to-remember split pane commands
  32. bind | split-window -h
  33. bind - split-window -v
  34. # bind-key c new-window -n 'bash'
  35. unbind '"'
  36. unbind %
  37. # moving between panes with vim movement keys
  38. bind h select-pane -L
  39. bind j select-pane -D
  40. bind k select-pane -U
  41. bind l select-pane -R
  42. # moving between windows with vim movement keys
  43. bind -r C-h select-window -t :-
  44. bind -r C-l select-window -t :+
  45. # resize panes with vim movement keys
  46. bind -r H resize-pane -L 5
  47. bind -r J resize-pane -D 5
  48. bind -r K resize-pane -U 5
  49. bind -r L resize-pane -R 5
  50. bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
  51. bind C-n new-session -n 'vim' -s '%%'
  52. # set 256 color
  53. set -g default-terminal "screen-256color"
  54. set-window-option -g xterm-keys on
  55. # ----------------------
  56. # Status Bar
  57. # -----------------------
  58. set-option -g status on # turn the status bar on
  59. set -g utf8 on
  60. set -g status-utf8 on # set utf-8 for the status bar
  61. set -g status-interval 5 # set update frequencey (default 15 seconds)
  62. # set-option -g status-position top # position the status bar at top of screen
  63. # visual notification of activity in other windows
  64. setw -g monitor-activity on
  65. set -g visual-activity on
  66. ## set color for status bar
  67. #set-option -g status-bg green #base02
  68. #set-option -g status-fg black #yellow
  69. #set-option -g status-attr dim
  70. ## set window list colors - red for active and cyan for inactive
  71. #set-window-option -g window-status-fg brightblue #base0
  72. #set-window-option -g window-status-bg colour236
  73. #set-window-option -g window-status-attr dim
  74. #set-window-option -g window-status-current-fg brightred #orange
  75. #set-window-option -g window-status-current-bg colour236
  76. #set-window-option -g window-status-current-attr bright
  77. ## show host name and IP address on left side of status bar
  78. #set -g status-left-length 70
  79. #set -g status-left "#[fg=black]: #S :"
  80. ## show session name, window & pane number, date and time on right side of
  81. ## status bar
  82. #set -g status-right-length 60
  83. #set -g status-right "#[fg=black]\"#H\" :: %d %b %Y :: %l:%M %p ::"
  84. set -g @tpm_plugins ' \
  85. tmux-plugins/tpm \
  86. tmux-plugins/tmux-resurrect \
  87. tmux-plugins/tmux-copycat \
  88. tmux-plugins/tmux-continuum \
  89. '
  90. run-shell '~/.tmux/plugins/tpm/tpm'
  91. run-shell '~/.tmux/plugins/tmux-resurrect/resurrect.tmux'
  92. ## Resurrect
  93. set -g @resurrect-strategy-vim 'session'
  94. set -g @resurrect-strategy-nvim 'session'
  95. # continuum
  96. set -g @continuum-save-interval '15'
  97. set -g @continuum-restore 'on'