我无法理解为什么在 tmux 中设置选项时需要-s
或选项。以下是一些似乎在设置时 使用或选项的答案:-g
escape-time
-s
-g
escape-time
以下是一些实验:
tmux kill-server
tmux
tmux detach
tmux
# Now we have two tmux sessions named [0] and [1] with [1] being the
# current session.
tmux set escape-time 2000
vim
# Press 'i' to get into insert mode.
# Then press 'Escape' to return to command mode. It takes 2 seconds.
# Enter ':q' to quit Vim.
tmux switch-client -t 0
vim
# Press 'i' to get into insert mode.
# Then press 'Escape' to return to command mode. It takes 2 seconds.
# Enter ':q' to quit Vim.
上述实验的结论是,escape-time
在一个会话中设置的选项会自动影响所有会话。
那么为什么需要-s
或-g
选项呢?