Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. # remap prefix from 'C-b' to 'C-q'
  2. unbind C-b
  3. set-option -g prefix C-q
  4. bind-key C-q send-prefix
  5.  
  6.  
  7. setw -g mode-keys vi
  8.  
  9. #Split Windows
  10. bind-key h split-window -h
  11. bind-key v split-window -v
  12.  
  13. #FullScreen the Pane
  14. bind -n M-z resize-pane -Z
  15.  
  16. bind -n M-m kill-pan
  17. # Use Alt-arrow keys without prefix key to switch panes
  18. bind -n M-Left select-pane -L
  19. bind -n M-Right select-pane -R
  20. bind -n M-Up select-pane -U
  21. bind -n M-Down select-pane -D
  22.  
  23.  
  24. #Pane copy/pasting
  25. unbind [
  26. unbind p
  27.  
  28. bind Escape copy-mode
  29. bind-key -T copy-mode-vi v send-keys -X begin-selection
  30. bind-key -T copy-mode-vi y send-keys -X copy-selection #For old version of tmux, need to use the following lines..
  31. bind p paste-buffer
  32.  
  33.  
  34. #bind-key -t vi-copy 'v' begin-selection
  35. #bind-key -t vi-copy 'y' copy-selection
  36. #bind C-v paste-buffer
  37.  
  38. # Reload tmux config
  39. bind r source-file ~/.tmux.conf
  40.  
  41.  
  42.  
  43. #enable scrolling up & down into the pane.
  44.  
  45. # TMUX configuration for copying selection buffer to the (X11) clipboard.
  46.  
  47. # Copy mouse selection tmux buffer AND to (X11) clipboard
  48. bind-key -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xsel -i --clipboard"
  49.  
  50. # Copy tmux buffer to the (X11) clipboard.
  51. bind -n C-c run "tmux save-buffer - | xsel -i --clipboard"
  52.  
  53. # Copy (X11) clipboard to tmux buffer and paste in current pane.
  54. bind -n C-v run "xsel -o --clipboard 2>/dev/null | tmux load-buffer - && tmux paste-buffer"
  55.  
  56. # Only in tmux 1.8 and higher. Copy selection will set (X11) clipboard as well.
  57. bind-key -Tcopy-mode-vi Enter send -X copy-pipe-and-cancel "xsel -i --clipboard"
  58.  
  59. #set -g mouse on ### Edit the .tmux.conf file with this setting
  60. #bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
  61. #bind -n WheelDownPane select-pane -t= \; send-keys -M
  62. #bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
  63. #bind -t vi-copy C-WheelUpPane halfpage-up
  64. #bind -t vi-copy C-WheelDownPane halfpage-down
  65. #bind -t emacs-copy C-WheelUpPane halfpage-up
  66. #bind -t emacs-copy C-WheelDownPane halfpage-down
  67.  
  68.  
  69.  
  70. #Theme
  71. set -g default-terminal "screen-256color" # Setting the correct term
  72. source-file ~/.tmux/themes/tomorrow-night.tmux
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement