Skip to content

Instantly share code, notes, and snippets.

@kmr
Created February 13, 2012 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmr/1813455 to your computer and use it in GitHub Desktop.
Save kmr/1813455 to your computer and use it in GitHub Desktop.
# Prefixを<Ctrl + b>から<Ctrl + t>に変えます。
# 例:新しいウィンドウを開くときは<Ctrl + t><c>と押すことになります。
# "t"以外の好きなキーにしても問題ありません。他の操作と重複しないようにしましょう。
set-option -g prefix C-z
# view
set -g status-interval 5
set -g status-left-length 16
set -g status-right-length 50
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=cyan,bold][#14H:#S]#[default]]'
set -g status-right '|#[fg=magenta,bold]#(load.sh)#[default]| #[fg=blue,bold][%a %m/%d %H:%M]#[default]'
set -g message-attr bold
set -g message-fg white
set -g message-bg red
set -g pane-active-border-fg cyan
set -g pane-active-border-bg black
setw -g window-status-current-fg blue
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-attr underline
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg green
# encode and keys
set-window-option -g utf8 on
set-window-option -g mode-keys vi
set-window-option -g automatic-rename off
set-window-option -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g base-index 1
unbind l
unbind ^C
bind C-r source-file ~/.tmux.conf
bind n next-window
bind p previous-window
bind c new-window
bind 1 break-pane
bind v split-window -v
bind h split-window -h
# ペインのサイズ変更をvim風にする
# <Prefix><Ctrl + { h | i | j | k }>
# <Ctrl + { h | i | j | k }>は連続して入力可能。
# 1回押すごとに5行(列)境界を移動させる。
bind -r C-left resize-pane -L 5
bind -r C-right resize-pane -R 5
bind -r C-down resize-pane -D 5
bind -r C-up resize-pane -U 5
bind -r C-s swap-pane -U
# ペインの移動1(Vim風にする)
bind -n C-left select-pane -L
bind -n C-right select-pane -R
bind -n C-down select-pane -D
bind -n C-up select-pane -U
bind k kill-pane
bind K kill-window
bind i display-panes
bind y copy-mode
bind w paste-buffer
bind s scroll-mode
# clip board hack
bind-key > save-buffer ~/tmp/tmux-buffer \; run-shell 'xsel -i -b < ~/tmp/tmux-buffer' \; display-message "copy to clipboard !"
bind-key < if-shell 'xsel -o -b > ~/tmp/tmux-buffer' 'load-buffer ~/tmp/tmux-buffer ; paste-buffer'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment