Reputation: 1670
Is there a shortcut key to close a tab?
I'm asking for something like creating a tab CTRL b + c
What shortcut should I use if I would like to close the 1:cmatrix*
tab?
Upvotes: 20
Views: 29422
Reputation: 1
It is not precisely the question but I reached this pane needing it. If you want to close a pane from another you can try listing the panes and killing it from id.
tmux list-panes
Should return something like:
0: [209x67] [history 284/2000, 167338 bytes] %2 (active)
1: [209x19] [history 722/2000, 256904 bytes] %1
Simply use this to kill the one you want:
tmux kill-pane -t #PANENUMBER
Upvotes: 0
Reputation: 327
prefix+x: kill the current pane
prefix+&: kill the current window
Note the difference between pane and window. OP actually wants to kill a window. So prefix+& will be better suited especially when a window has multiple pane splits.
Upvotes: 17
Reputation: 957
I think this is what you are looking for: http://www.dayid.org/os/notes/tm.html
Specifically this part:
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
Upvotes: 32