I am unable to understand why exactly the -s or -g option is
required while setting the escape-time option in tmux. Here are some
answers that seem to use the -s or -g option while setting
escape-time:
Here are some experiments:
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.
The conclusion of the above experiment is that escape-time option set
in one session affects all sessions automatically.
Why is the -s or -g option required then?