Zexian Li

tmux配置及常用内容

2020-08-21 · 1 min read

参考~/.tmux.conf

# Status bar
# colors
set -g status-bg black
set -g status-fg white
# alignment
set-option -g status-justify centre
# spot at left
set-option -g status-left '#[bg=black,fg=yellow][#[fg=white]#S#[fg=yellow]]'
set-option -g status-left-length 20
# window list
setw -g automatic-rename on
set-window-option -g window-status-format '#[yellow]#I:#[default]#W#[fg=grey,yellow]'
set-window-option -g window-status-current-format '#[fg=white,bold]#I#[fg=yellow]:#[fg=white]#W#[fg=yellow]'
# spot at right
set -g status-right '#[fg=yellow][#[fg=white]%Y-%m-%d#[fg=yellow]]'
setw -g mouse
bind c new-window -c "#{pane_current_path}"

bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

set-window-option -g mode-keys vi

常用指令

tmux ls
tmux new -s new_name
tmux kill-session -t 1

Bad decisions make good stories.