Skip to content

Instantly share code, notes, and snippets.

@kometchtech
Created September 7, 2017 14:04
Show Gist options
  • Save kometchtech/f5de2135f87d9d92f135389a8ec9d191 to your computer and use it in GitHub Desktop.
Save kometchtech/f5de2135f87d9d92f135389a8ec9d191 to your computer and use it in GitHub Desktop.
tmux config コピペ
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# vi-style controls for copy mode
setw -g mode-keys vi
# prefixキーをC-wに変更する
set -g prefix C-w
# C-bのキーバインドを解除する
unbind C-b
# キーストロークのディレイを減らす
set -sg escape-time 0
# ウィンドウのインデックスを1から始める
set -g base-index 1
# ペインのインデックスを1から始める
setw -g pane-base-index 1
# 設定ファイルをリロードする
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# | でペインを縦に分割する
bind | split-window -h
# - でペインを横に分割する
bind - split-window -v
# 256色端末を使用する
set-option -g default-terminal "screen-256color"
# ステータスバーの色を設定する
set -g status-fg white
set -g status-bg black
# ウィンドウリストの色を設定する
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
# アクティブなウィンドウを目立たせる
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
# ペインボーダーの色を設定する
set -g pane-border-fg green
set -g pane-border-bg black
# アクティブなペインを目立たせる
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
# コマンドラインの色を設定する
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# ステータスバーを設定する
## 左パネルを設定する
set -g status-left-length 40
##set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
# #H => マシン名
# #P => ペイン番号
# 最左に表示
set-option -g status-left '#H:[#P]'
## 右パネルを設定する
set -g status-right "#[fg=cyan][%Y-%m-%d(%a) %H:%M]"
## リフレッシュの間隔を設定する(デフォルト 15秒)
set -g status-interval 60
## ウィンドウリストの位置を中心寄せにする
set -g status-justify centre
## ヴィジュアルノーティフィケーションを有効にする
setw -g monitor-activity on
set -g visual-activity on
## ステータスバーを上部に表示する
#set -g status-position bottom
# コピーモードを設定する
## viのキーバインドを使用する
setw -g mode-keys vi
# vでマーク開始
bind -t vi-copy v begin-selection
# Vで行の先頭からマーク開始
bind -t vi-copy V select-line
# C-vで矩形選択の切り替え
bind -t vi-copy C-v rectangle-toggle
# yでヤンク
bind -t vi-copy y copy-selection
# Yで1行ヤンク
bind -t vi-copy Y copy-line
# utf8を有効にする
set-window-option -g utf8 on
set-window-option -g status-utf8 on
# ウィンドウ履歴の最大行数
set-option -g history-limit 10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment