備忘録がてら
set -g @plugin "nordtheme/tmux"
set -g @plugin 'noscript/tmux-mighty-scroll'
set -g @plugin 'tmux-plugins/tmux-sensible'
# to store tmux sessions
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @sidebar-tree-position 'left'
set -g @sidebar-tree-width '40'
set -g @sidebar-tree-command 'ls -la'
set -g @sidebar-tree-command 'git status'
set -g @sidebar-tree-focus 'h'
set -g @sidebar-tree-command 'find . -maxdepth 4 -type f -not -path "*/\.*" -not -path "*/node_modules/*" -not -path "*/vendor/*" | sort'
set -g @sidebar-tree-focus 'T'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -sg escape-time 1
set -g default-terminal "screen-256color"
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g mouse on
setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
run '~/.tmux/plugins/tpm/tpm'
set -g @plugin 'wfxr/tmux-power'
set -g @tmux_power_theme 'moon'
# # for searching
bind / copy-mode \; send-key ?
# for reloading config
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
# for status line
set -g status-right '#{prefix_highlight} | %Y-%m-%d %H:%M '
プラグイン管理
- TPM
便利系
bind / copy-mode \; send-key ?
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
prefix + r
で設定ファイルを再読み込みするのでtmux.confをいじるのに便利
/
で検索
vimっぽく?
set -g mouse on
setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
ペイン間の移動をvimっぽくできたり、クリップボードがvim likeになってたり
その他
zshrcに
if [ -z ${TMUX} ]; then
tmux new-session -A -s default
fi
を入れていて、ターミナルを開くたびに立ち上がっている or 立ち上げたdefault sessionに入るようにしている