LoginSignup
1
1

More than 1 year has passed since last update.

tmux.confを晒す

Last updated at Posted at 2020-02-03
# option prefix
unbind C-b
set-option -g prefix C-t

# key bind
bind k kill-pane
bind K kill-window
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# mouse
set-option -g mouse on

# Vi風キーバインド
set-window-option -g mode-keys vi
bind v copy-mode \; display "Copy Mode!"
bind -T copy-mode-vi v send-keys -X begin-selection
# `tmux` のコピペとクリップボードの連携
# Linux with xsel
if "which xsel" "bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -bi'"
if "which xsel" "bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xsel -bi'"
if "which xsel" "bind-key ] run 'tmux set-buffer -- \"$(xsel -bo)\"; tmux paste-buffer'"
# Mac
if "which pbcopy" "bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'"
if "which pbcopy" "bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'pbcopy'"
if "which pbpaste" "bind-key ] run 'tmux set-buffer -- \"$(pbpaste)\"; tmux paste-buffer'"

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

# color
set-option -g default-terminal screen-256color
set -g status-fg cyan
set -g status-bg black
set -g pane-active-border-style "bg=default fg=cyan"

# status bar
set-option -g status-interval 1

# status box left
set -g status-left-length 120
set-option -g status-left '#[fg=cyan,bg=#303030]#{?client_prefix,#[reverse],} #H[#S] #[default]'

# status box right
set -g status-left-length 120
set-option -g status-right '%Y/%m/%d(%a) %H:%M'

# window
bind -n C-S-Left run "tmux swap-window -t -1 && tmux previous-window"
bind -n C-S-Right run "tmux swap-window -t +1 && tmux next-window "

# scroll lines
set-option -g history-limit 10000
1
1
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
1
1