diff options
| author | user <user@clank> | 2026-08-16 19:25:52 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-16 19:25:52 +0200 |
| commit | 503b309187eaf0bc7282dd09e93c695dba11abb5 (patch) | |
| tree | 420112d1b9ea8416375b7f0cd0b4777ee8137599 /docs | |
| parent | sl0ppty: a pane can change tabs (diff) | |
| download | slosh-503b309187eaf0bc7282dd09e93c695dba11abb5.tar.gz slosh-503b309187eaf0bc7282dd09e93c695dba11abb5.tar.xz slosh-503b309187eaf0bc7282dd09e93c695dba11abb5.zip | |
sl0ppty: `C-a >` sends this pane to the next tab
C-a > push it to the tab after C-a b into a tab of its own
C-a < push it to the tab before
Three actions rather than three special cases in the key handler, which is what
puts them in the cheatsheet and the palette without another line of code -- and
the palette is where you find a thing you did not know to look for.
You do not follow the pane, and a toast says where it went: "moved to tab 2 (api)".
A key you might press twice needs to say what it did, and following would take you
away from what you were doing. The tab's *name* is read before the move and its
*number* after: emptying this tab removes it and shifts everything along, so the
number read first is not the number anybody will see. When the tab you were in is
the one that goes, you arrive in the survivor because there is nowhere to stay.
`>` and `<` are the shifted period and comma, and the defaults bind both halves --
a terminal does not report shift for punctuation, so `>` arrives as a bare period
the way `?` arrives as a bare slash. The config loader already did this for a chord
you write by hand; the defaults had to do it themselves. The cost is that `.` and
`,` are spoken for, which is the cost `/` already pays for `?`. `b` is for break
out, the word tmux taught everybody for this.
**Two things the tests caught, both mine.**
`panes` reported a pane's tab as an index while every command that takes a tab
wants an id -- and my own test conflated them, passing only because the two agree
until a tab is removed, which is half of what these keys do. There is now a
`tab_id` beside the `tab`: one is where it sits in the strip, the other is what you
pass back.
And three more rows overflowed the cheatsheet: `modal_frame` clamps the box to the
screen, so at 56x44 the `session` group was simply not drawn. The sheet now says
`+7 more, in docs/keys.md` when it cannot show everything -- counted by walking the
rows it skipped, because arithmetic on two uneven columns claimed six were hidden
on a screen showing all of them. A list that quietly stops is worse than a short
one: the reader cannot tell that the key they wanted was on it. Reflowing to two
columns when the height forces it would be better than a footnote, and is not this
commit.
Verified: `tests/test_move_pane.py` at 38 checks -- the keys in both directions,
breaking out, the refusal when there is only one tab, pushing the last pane out and
landing in the survivor, and that the sheet prints `>` rather than the bare period
it also answers to while the palette finds it by label. `tests/test_help.py` gained
the short-terminal case and lost an assumption about its own fixture height.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/keys.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/keys.md b/docs/keys.md index a5befad..74d6ceb 100644 --- a/docs/keys.md +++ b/docs/keys.md @@ -21,6 +21,8 @@ you can type into. | `m` | minimise it into the strip along the bottom | | `x` | close this pane | | `r` | run a finished pane's command again | +| `>` `<` | push this pane to the next / previous tab (a toast says where it went) | +| `b` | break this pane out into a tab of its own | | `c` | new tab | | `Tab` `shift+Tab` | next / previous tab | | `1`…`9` | go to that tab | @@ -95,13 +97,17 @@ being bound at all. | group | actions | |---|---| -| panes | `split-cols` `split-rows` `close-pane` `rerun` `zoom` `minimize` `rotate-layout` `clear-shaders` | +| panes | `split-cols` `split-rows` `close-pane` `rerun` `zoom` `minimize` `rotate-layout` `clear-shaders` `pane-to-next-tab` `pane-to-prev-tab` `pane-to-new-tab` | | focus | `focus-left` `focus-right` `focus-up` `focus-down` `focus-next` `finder` | | size | `resize-left` `resize-right` `resize-up` `resize-down` `equalize` | | tabs | `new-tab` `next-tab` `prev-tab` `select-tab-1` … `select-tab-9` | | scroll | `scroll-up` `scroll-down` `scroll-page-up` `scroll-page-down` `scroll-top` `scroll-bottom` | | session | `palette` `help` `edit-config` `detach` `quit` `literal-prefix` | +`>` and `<` are the shifted period and comma. A terminal does not report the shift +for punctuation, so `.` and `,` answer to them too — the same deal `/` has with +`?`, and the reason the defaults bind both halves. + `scroll-up` and `scroll-down` have no default key — the wheel does that job — which is exactly the case the palette exists for. So does `clear-shaders`, which undoes whatever the program in a pane painted on it |
