Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # prefixキーをC-Spaceに変更
- set -g prefix C-Space
- # C-bのキーバインドを解除
- unbind C-b
- # キーストロークのディレイを減らす
- set -sg escape-time 1
- # 設定ファイルをリロードする
- bind r source-file ~/.tmux.conf \; display "Reloaded!"
- # 番号基準値を変更
- set -g base-index 1
- # ウィンドウを閉じた時に番号を詰める
- set -g renumber-windows on
- # tmuxを256色表示できるようにする
- set -g default-terminal screen-256color
- set -g terminal-overrides 'xterm:colors=256'
- # status-bar をトップに配置する
- set -g status-position top
- # status-bar left
- set -g status-left-length 90
- set -g status-left "#{?client_prefix,#[reverse],}#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
- # status-bar right
- set -g status-right-length 90
- set -g status-right "#[fg=cyan][%Y-%m-%d(%a) %H:%M]"
- # status-bar center
- set -g status-justify centre
- # window-status のフォーマットを指定する
- set-window-option -g window-status-format " #I: #W "
- # カレントウィンドウの window-status のフォーマットを指定する
- set-window-option -g window-status-current-format "#[reverse] #I: #W #[default]"
- # status-bar の色を設定する
- set -g status-bg "colour0"
- set -g status-fg "colour10"
- # inactive な Window の色を設定する
- set -g window-style 'fg=colour235,bg=colour187'
- set -g pane-border-style "fg=colour238,bg=colour230"
- # active な Window の色を設定する
- set -g window-active-style 'fg=colour238,bg=colour230'
- set -g pane-active-border-style "fg=colour242,bg=colour230"
- # vimのキーバインドでペインを移動する
- bind h select-pane -L
- bind j select-pane -D
- bind k select-pane -U
- bind l select-pane -R
- # vimのキーバインドでペインをリサイズする
- bind -r H resize-pane -L 5
- bind -r J resize-pane -D 5
- bind -r K resize-pane -U 5
- bind -r L resize-pane -R 5
- # | でペインを縦分割する
- bind | split-window -h
- unbind '"'
- # - でペインを縦分割する
- bind - split-window -v
- unbind %
- # マウス操作を有効にする
- set -g mouse on
- bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
- # コピーモードを設定する
- # コピーモードでvimキーバインドを使う
- setw -g mode-keys vi
- # 'v' で選択を始める
- bind -T copy-mode-vi v send -X begin-selection
- # 'V' で行選択
- bind -T copy-mode-vi V send -X select-line
- # 'C-v' で矩形選択
- bind -T copy-mode-vi C-v send -X rectangle-toggle
- # 'y' でヤンク
- bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
- # 'Y' で行ヤンク
- bind -T copy-mode-vi Y send -X copy-line
- # 'C-p'でペースト
- bind C-p paste-buffer
- # macos のクリップボードと連携
- bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
- bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement