如何在tmux中关闭标签页?

18

有没有关闭选项卡的快捷键?
我想要像创建标签一样的东西,例如CTRL b + c
如果我想要关闭1:cmatrix*标签,应该使用什么快捷键? enter image description here

3个回答

32

我认为这就是你正在寻找的内容:http://www.dayid.org/os/notes/tm.html

具体来说,是这部分:

kill the current pane: ^b x OR (logout/^D)  
close other panes except the current one: ^b !  

The formatting here is simple enough to understand (I would hope). 
^ means ctrl+, so ^x is ctrl+x. M- means meta (generally left-alt or escape)+,
so M-x is left-alt+x

谢谢Webbies。这正是我在寻找的。 - Cristian
1
关闭当前窗格:^b x 或 (logout/^D) = Ctrl+b x - user1270589
此外,在终端中退出(^c)当前运行的程序后,您还可以执行 ^d 或只需键入 exit - Matt Popovich

10
prefix+x: kill the current pane
prefix+&: kill the current window
请注意面板(pane)和窗口(window)之间的区别。实际上,OP想要关闭窗口。因此,使用前缀+& 将更加合适,尤其是当一个窗口有多个面板拆分时。

0

这不是确切的问题,但我需要这个面板。 如果你想从另一个面板关闭一个面板,你可以尝试列出所有面板并通过ID杀死它。

tmux list-panes

应该返回类似这样的东西:
0: [209x67] [history 284/2000, 167338 bytes] %2 (active)
1: [209x19] [history 722/2000, 256904 bytes] %1

只需使用此代码即可消灭您想要的对象:

tmux kill-pane -t #PANENUMBER

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接