emacsライクなキーバインドのtmux
emacs内でmulti-termを走らせるのもいいですが、
たまにシェルにこもるときに快適でありたいのでtmuxを導入し、emacsの操作感に近づけてみました。
まだ凝りきれていない部分もありますが、
pecoと合わせればhelmやidoも再現できる気がするので弄んでみます。
######################################## # 基本設定 ######################################## # Prefix set-option -g prefix C-z bind-key C-z send-prefix unbind-key C-b # 日本語環境 setw -g utf8 on set -g status-utf8 on set-window-option -g utf8 on # マウス操作を有効にする setw -g mouse ######################################## # Look & Feel ######################################## # ステータスバー set-option -g status-utf8 on # ステータスバーを Utf-8 に対応 set-option -g status-interval 5 # ステータスバーを5秒毎に描画し直す set-option -g status-justify centre # センタライズ(主にウィンドウ番号など) set-option -g status-position top # ステータスバーをトップに配置する set-option -g status-left-length 90 set-option -g status-right-length 90 set-option -g status-left '#H:[#P]' set-option -g status-right '[%y-%m-%d(%a) %H:%M]' set -g status-bg black set -g status-fg white set -g message-fg white set -g message-bg red # window set-window-option -g mode-bg white set-window-option -g mode-fg black set-window-option -g window-status-fg white set-window-option -g window-status-bg black set-window-option -g window-status-current-bg black set-window-option -g window-status-current-fg green # pane set -g pane-active-border-fg cyan set -g pane-active-border-bg black setw -g window-status-current-fg blue # color set-option -g default-terminal xterm-256color ######################################## # KeyBinding ######################################## bind C-r source-file ~/.tmux.conf # pane & window unbind 1 unbind ^C unbind & bind 1 break-pane bind 2 split-window -v bind 3 split-window -h bind C-k kill-pane bind i display-panes bind C-K kill-window bind C-t next-window bind c new-window # copy bind y copy-mode bind p paste-buffer