Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. # prefixキーをC-Spaceに変更
  2. set -g prefix C-Space
  3.  
  4. # C-bのキーバインドを解除
  5. unbind C-b
  6.  
  7. # キーストロークのディレイを減らす
  8. set -sg escape-time 1
  9.  
  10. # 設定ファイルをリロードする
  11. bind r source-file ~/.tmux.conf \; display "Reloaded!"
  12.  
  13. # 番号基準値を変更
  14. set -g base-index 1
  15.  
  16. # ウィンドウを閉じた時に番号を詰める
  17. set -g renumber-windows on
  18.  
  19. # tmuxを256色表示できるようにする
  20. set -g default-terminal screen-256color
  21. set -g terminal-overrides 'xterm:colors=256'
  22.  
  23. # status-bar をトップに配置する
  24. set -g status-position top
  25.  
  26. # status-bar left
  27. set -g status-left-length 90
  28. set -g status-left "#{?client_prefix,#[reverse],}#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
  29.  
  30. # status-bar right
  31. set -g status-right-length 90
  32. set -g status-right "#[fg=cyan][%Y-%m-%d(%a) %H:%M]"
  33.  
  34. # status-bar center
  35. set -g status-justify centre
  36.  
  37. # window-status のフォーマットを指定する
  38. set-window-option -g window-status-format " #I: #W "
  39.  
  40. # カレントウィンドウの window-status のフォーマットを指定する
  41. set-window-option -g window-status-current-format "#[reverse] #I: #W #[default]"
  42.  
  43. # status-bar の色を設定する
  44. set -g status-bg "colour0"
  45. set -g status-fg "colour10"
  46.  
  47. # inactive な Window の色を設定する
  48. set -g window-style 'fg=colour235,bg=colour187'
  49. set -g pane-border-style "fg=colour238,bg=colour230"
  50.  
  51. # active な Window の色を設定する
  52. set -g window-active-style 'fg=colour238,bg=colour230'
  53. set -g pane-active-border-style "fg=colour242,bg=colour230"
  54.  
  55. # vimのキーバインドでペインを移動する
  56. bind h select-pane -L
  57. bind j select-pane -D
  58. bind k select-pane -U
  59. bind l select-pane -R
  60.  
  61. # vimのキーバインドでペインをリサイズする
  62. bind -r H resize-pane -L 5
  63. bind -r J resize-pane -D 5
  64. bind -r K resize-pane -U 5
  65. bind -r L resize-pane -R 5
  66.  
  67. # | でペインを縦分割する
  68. bind | split-window -h
  69. unbind '"'
  70.  
  71. # - でペインを縦分割する
  72. bind - split-window -v
  73. unbind %
  74.  
  75. # マウス操作を有効にする
  76. set -g mouse on
  77. bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
  78.  
  79. # コピーモードを設定する
  80. # コピーモードでvimキーバインドを使う
  81. setw -g mode-keys vi
  82.  
  83. # 'v' で選択を始める
  84. bind -T copy-mode-vi v send -X begin-selection
  85.  
  86. # 'V' で行選択
  87. bind -T copy-mode-vi V send -X select-line
  88.  
  89. # 'C-v' で矩形選択
  90. bind -T copy-mode-vi C-v send -X rectangle-toggle
  91.  
  92. # 'y' でヤンク
  93. bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
  94.  
  95. # 'Y' で行ヤンク
  96. bind -T copy-mode-vi Y send -X copy-line
  97.  
  98. # 'C-p'でペースト
  99. bind C-p paste-buffer
  100.  
  101. # macos のクリップボードと連携
  102. bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
  103. bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement