注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
#!/usr/bin/env python | |
# vim: set fileencoding=utf-8 | |
# | |
# USAGE: | |
# Back up your tmux old config, run the script and redirect stdout to your conf | |
# file. Example: | |
# | |
# $ cp ~/.tmux.conf ~/.tmux.conf.orig | |
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf | |
# |
type Set struct { | |
list map[int]struct{} //empty structs occupy 0 memory | |
} | |
func (s *Set) Has(v int) bool { | |
_, ok := s.list[v] | |
return ok | |
} |
As configured in my dotfiles.
start new:
tmux
start new with session name: