如何使用键盘在 tmux 中选择会话 Ma

发布于 2025-01-15 00:07:41 字数 445 浏览 2 评论 0原文

tmux 中,我正在运行多个会话。要切换会话,我按下 tmux 转义序列,然后按下 s 键。将显示会话列表:

tmux session list

现在我可以按 4 键,例如,如果我想进入会话 blacklist

我想要参加 g-orchestrator 会议。 如果不使用箭头键,我可以按什么组合键来进入该会话?

In tmux I have multiple sessions running. To switch sessions, I hit my tmux escape sequence and then the s key. The session list appears:

tmux session list

Now I can hit the key 4, for example, if I want to go to session blacklist.

I want to go to session g-orchestrator. Without using the arrow keys, what key combination can I hit to enter that session?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

徒留西风 2025-01-22 00:07:41

Ma 的意思是“Meta-a”,在大多数终端程序中通常是 Alt-a(在 Apple 的 Terminal.app 中,您必须启用应用程序首选项“使用选项作为 Meta 键”才能正常工作)。因此,在这种情况下,组合键 Alt-a 将直接带您进入该会话。其他会话可通过 Alt-b、Alt-c、Alt-d 等访问。

M-a means "Meta-a", which is usually Alt-a in most terminal programs (in Apple's Terminal.app you must enable the app preference "Use option as Meta key" before this will work). So, in this case, the key combination Alt-a will take you to that session directly. Additional sessions will be reachable via Alt-b, Alt-c, Alt-d, etc.

只为守护你 2025-01-22 00:07:41

我正在使用 iTerm2

在 iTerm2 上什么对我不起作用

  • 使用左或右选项键的“Meta”设置。

在 iTerm2 上对我有用的方法

  • 按住 escape 键并按“a”。尽管很奇怪,但它并不能始终如一地工作。有时我必须松开退出键并再次执行该操作。
  • 使用“Esc+”设置左或右选项键。然后,例如我按住选项键并点击“a”。这似乎工作相当可靠。该设置位于“配置文件”>“配置文件”下按键>左 Option 键/右 Option 键,我在下面添加了一张图片:

在此处输入图像描述

I am using iTerm2.

What did not work for me on iTerm2

  • Using the "Meta" setting for the left or right option key.

What worked for me on iTerm2

  • Holding down the escape key and hitting "a". Although weirdly enough it doesn't work consistently. Sometimes I have to release the escape key and do it again a second time.
  • Using the "Esc+" setting for the left or right option key. Then for example I hold down the option key and hit "a". This seems to be working fairly reliable. The setting is under Profiles > Keys > Left Option key / Right Option key, and I include a picture below:

enter image description here

物价感观 2025-01-22 00:07:41

问:如何使 option/alt 键像 Meta 一样起作用或发送转义码?
答:转到“首选项”>“配置文件选项卡。在左侧选择您的个人资料,然后打开“键盘”选项卡。底部是一组按钮,可让您选择 Option 键的行为。对于大多数用户来说,Esc+ 将是最佳选择。

来自 https://iterm2.com/faq.html

Esc+ 是大多数用户的最佳选择。我尝试了MetaNormal。如果不在 Tmux 中,Meta 可以工作,但在 Tmux 中则不起作用。

Q: How do I make the option/alt key act like Meta or send escape codes?
A: Go to Preferences > Profiles tab. Select your profile on the left, and then open the Keyboard tab. At the bottom is a set of buttons that lets you select the behavior of the Option key. For most users, Esc+ will be the best choice.

From https://iterm2.com/faq.html

Esc+ is the best choice for most users. I tried Meta and Normal. Meta worked if not in Tmux, but didn't work in Tmux.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文