1
0
mirror of https://github.com/samoshkin/tmux-config.git synced 2026-01-04 00:38:01 +00:00

Add keybinding to close all other windows but current one

This commit is contained in:
Alexey Samoshkin
2017-11-23 00:25:31 +02:00
parent c58943c3c9
commit 6a0277a2fc
2 changed files with 14 additions and 7 deletions

View File

@@ -30,9 +30,7 @@ TBD:
- [ ] retain current path when new pane is created
- [ ] integration with clipboard
- [ ] fix pane resizing
- [ ] key binding to close all windows but current one
- [ ] fix installation script to properly install TPM
- [ ] change zoom action key binding to `prefix +`
Installation
@@ -140,16 +138,24 @@ Let's go through them:
<td><code>&lt;prefix&gt; C-o</code></td>
<td>Swap current active pane with next one</td>
</tr>
<tr>
<td><code>&lt;prefix&gt; +</code></td>
<td>Toggle zoom for current pane</td>
</tr>
<tr>
<td><code>&lt;prefix&gt; x</code></td>
<td>Kill current pane</td>
</tr>
<tr>
<td><code>&lt;prefix&gt; C-x</code></td>
<td>Kill current window (with confirmation)</td>
<td><code>&lt;prefix&gt; X</code></td>
<td>Kill current window</td>
</tr>
<tr>
<td><code>&lt;prefix&gt; X</code></td>
<td><code>&lt;prefix&gt; C-x</code></td>
<td>Kill other windows but current one (with confirmation)</td>
</tr>
<tr>
<td><code>&lt;prefix&gt; C-q</code></td>
<td>Kill current session (with confirmation)</td>
</tr>
<tr>

View File

@@ -86,8 +86,9 @@ bind -r C-o swap-pane -D
# Kill pane/window/session shortcuts
unbind &
bind x kill-pane
bind C-x confirm-before -p "kill-window #W? (y/n)" kill-window
bind X confirm-before -p "kill-session #S? (y/n)" kill-session
bind X kill-window
bind C-x confirm-before -p "kill other windows? (y/n)" "kill-window -a"
bind C-q confirm-before -p "kill-session #S? (y/n)" kill-session
# Merge session with another one (e.g. move all windows)
# If you use adhoc 1-window sessions, and you want to preserve session upon exit