blob: d7d002ff58e69543dd7769dfbe85298fee0c5a4f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# `:` — vim's command line with acme's vocabulary. It focuses the pane's OWN
# tag in NORMAL mode (block cursor, NOR in the prefix), parked at the tail's
# START — always the start, so `:w` is the same two keystrokes every time.
# Motions walk the tag's words (w selects the "Save" span, exactly like a body
# word motion), the execute chord runs the one under the cursor and hands the
# body back in normal mode — same keys as the body, so Tab by default (see
# swap_enter_tab). Esc backs out instead, leaving the tail as it was.
lines c.txt 6
start 30 100 c.txt
wait 8000 Kill Newcol
wait 8000 c.txt
stable 700 20000
# edit line 1 so Save has something to write
key i
text ZZEDIT
key esc
settle 700
stable 400 5000
snap edited
# `:` -> the tag, in normal mode, cursor on the tail's first cell
key :
stable 400 5000
snap colon
# w -> the "Save" span (selected, like the body's word motion)
key w
stable 400 5000
snap word
# Tab executes it: c.txt is written and focus is back in the body
key tab
settle 800
stable 400 5000
snap saved
snapfile written /tmp/pardes-snap/tagcmd/cwd/c.txt
# `:` then Esc: back to the body with the tail untouched, nothing run
key :
stable 400 5000
key esc
settle 700
stable 400 5000
snap escaped
|