LoginSignup
4
3

More than 5 years have passed since last update.

僕の考えた最強のtmux.conf

Posted at
# utf-8環境                                                  
# setw -g utf8 on                                            
# set -g status-utf8 on                                      

#全てのベルを無視                                            
set-option -g bell-action none                               
# ウィンドウ番号基準値                                       
set-option -g base-index 1                                   
# ウィンドウの自動リネームoff                                
set-window-option -g automatic-rename off                    
#ウィンドウで動作があるとステータスラインでハイライト        
set-window-option -g monitor-activity on                     

# コピー、選択モードのキーバインドvi                         
set -g mode-keys vi                                          

# プレフィックスキー C-x                                     
unbind C-b                                                   
set-option -g prefix C-x                                     

# 設定ファイル再読み込み r                                   
bind r source-file ~/.tmux.conf                              

# 直前のウィンドウ t                                         
bind C-t last-window                                         

# デタッチ d                                                 
bind d detach                                                

# タイトル変更 A                                             
bind A command-prompt "rename-window %%"                     

# ウィンドウ選択画面                                         
bind Space choose-window                                     

# 新ウィンドウ作成                                           
bind c new-window -c "#{pane_current_path}"                  

# 分割していたペインそれぞれをWindowに                       
bind b break-pane                                            

# ペイン終了                                                 
bind k kill-pane                                             
# ウィンドウ終了                                             
bind K kill-window                                           

# ペイン番号表示                                             
bind i display-panes                                         

# ペインの縦分割                                             
bind m split-window -vc "#{pane_current_path}"               
# ペインの横分割                                             
bind n split-window -hc "#{pane_current_path}"               

# ペインの移動                                               
bind h select-pane -L                                        
bind j select-pane -D                                        
bind k select-pane -U                                        
bind l select-pane -R                                        

# 文字色と背景色                                             
set -g status-fg black                                       
set -g status-bg white                                       

# 現在のウィンドウの色                                       
set-window-option -g window-status-current-fg   white        
set-window-option -g window-status-current-bg   blue         

# rbenv localを使えるようにする                              
set-environment -gu RBENV_VERSION                            

# paneのリサイズを簡単に行う                                 
bind -r C-h resize-pane -L 5                                 
bind -r C-j resize-pane -D 5                                 
bind -r C-k resize-pane -U 5                                 
bind -r C-l resize-pane -R 5                                 

# Vi キーバインド                                            
set-window-option -g mode-keys vi                            

# Prefix+v でコピーモード開始                                
bind-key v copy-mode \; display "Copy mode!"                 
#bind-key -t vi-copy v begin-selection                       

# Prefix+p でペースト                                        
# クリップボードにも保存されているので Cmd-v でもペースト可能
bind-key p paste-buffer                                      

# vim <=> tmux 間でクリップボード利用を可能にする            
set-option -g default-command ""                             
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3