# A tag's normal mode is the body's: h/l/w move in the tag's own text, and # moving between panes is the window keys' job from a tag as from a body -- # there are no tag-only hops. `:` is the one key a tag and a body do not # share: from the body it focuses the pane's own tag, from the tag it hands the # keyboard back to the body. Each tag remembers its cursor; the first time # there is nothing to remember and it starts on Save. # # Evidence is the `cursor=` header (the ACTIVE pane's cursor, which while a tag # is focused sits on THAT pane's tag row) plus each pane's layout box, which # carries its BODY mode as one character: ` ` normal, `^` insert, `$` tty. The # tag has a mode of its own, so the box never changes while a tag is used. file w.txt alpha\nbeta\ngamma start 31 100 w.txt wait 8000 Newcol Joincol wait 8000 w.txt stable 700 20000 # A FILE boots alone, so the launch shell is opened here: Alt-n opens it and # focuses it, Alt-c puts it in a column of its own on the right, SPC w h comes # back to the file. key a-n key a-c stable 700 15000 key space w h stable 400 5000 # Alt-n: a shell below the file, so the left column has two rows and every # direction has somewhere to go key a-n stable 700 15000 key space w k stable 400 5000 snap start # `:` -> the file's OWN tagline, normal mode, on Save key : stable 400 5000 snap colon # w selects in the tag the way it selects in a body key w stable 400 5000 snap word # l is a motion in the tag, not a hop to the next pane key l l stable 400 5000 snap in-tag # the window keys move between panes from a tag as from a body: the tag lets # go and the neighbour's BODY takes the keyboard key c-w l stable 400 5000 snap right # `:` there -> that pane's own tag, on its Save the first time key : stable 400 5000 snap right-tag # back left, and `:` finds the file's tag cursor where l left it key c-w h stable 400 5000 key : stable 400 5000 snap left-tag # `:` in the tag's normal mode: back to the body key : stable 400 5000 snap back-to-body # A TERMINAL KEEPS ITS TTY MODE. Put the launch shell in raw tty mode (Ctrl-b), # click its tagline and come back: its box reads `$` throughout, because the # tag's mode is the tag's own. key c-w l stable 400 5000 key c-b stable 700 15000 snap tty-on press left @Mode 3 release left @Mode 3 stable 400 5000 snap tty-tag key esc settle 100 key : stable 400 5000 snap tty-restored # The column and workspace tags are Texts in the same layout, with the same # keys: Up from a pane with nothing above it reaches its column's tag, in # normal mode, then the workspace's; Down comes back the same way. key c-b stable 700 15000 key c-w h stable 400 5000 key c-w k stable 400 5000 snap column-tag key w stable 400 5000 snap column-word key c-w k stable 400 5000 snap workspace-tag # `$` is the last cell; five long-word steps back land on `Dump`, and the # execute key runs it and gives the keyboard back to the body FIRST -- `Exit` # lives up here too, so a builtin that frees the session must never return # into a focused header. Dump grows a `Restore ` word, which is also the # case where the line gets longer than the column you were parked on. key g l stable 400 5000 snap topbar-dollar key B B B B B stable 400 5000 snap topbar-dump-word key tab stable 700 15000 snap topbar-exec # THE DELETION HAZARD, from the bar itself: `Restore` frees every pane and # swaps the core out from under the caller. Walk back up onto the word the # Dump just grew -- B twice off the tail, because the LONG word motions are the # ones that step over a path in one go -- and run it. key c-w k key c-w k stable 400 5000 key g l B B stable 400 5000 snap topbar-restore-word key tab stable 900 15000 snap topbar-restored