是否有创建新会话的 tmux 快捷方式?
Is there a tmux shortcut to create a new session?
就像 leader_key + C 在会话中创建一个新的 window 一样。创建新会话是否有类似的快捷方式?
目前,我使用 leader_key + new
没有预定义的快捷方式,唯一的本地方式是:
创建 session:tmux new -s session_name
Ctrl-B + d to detach
Return 到您的 session: tmux attach-session -t session_name
为什么不在 .tmux.conf
中为此创建一个键绑定?
这两个设置可让您 create/kill 在分别按 Prefix Shift+s
或 Prefix Shift+K
时创建一个新会话:
bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
bind K confirm kill-session
Prefix Shift+s
将在状态行中打开命令提示符,要求输入新的会话名称。它将使用该名称创建一个新会话,或者使用该名称附加到一个已经存在的会话。
就像 leader_key + C 在会话中创建一个新的 window 一样。创建新会话是否有类似的快捷方式? 目前,我使用 leader_key + new
没有预定义的快捷方式,唯一的本地方式是:
创建 session:
tmux new -s session_name
Ctrl-B + d to detach
Return 到您的 session:
tmux attach-session -t session_name
为什么不在 .tmux.conf
中为此创建一个键绑定?
这两个设置可让您 create/kill 在分别按 Prefix Shift+s
或 Prefix Shift+K
时创建一个新会话:
bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
bind K confirm kill-session
Prefix Shift+s
将在状态行中打开命令提示符,要求输入新的会话名称。它将使用该名称创建一个新会话,或者使用该名称附加到一个已经存在的会话。