blob: 0e9047fb1d8e0e478096340cc78f70c27251dac2 (
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
41
|
# `:` — vim's command line with acme's vocabulary. It focuses the pane's OWN
# tag in NORMAL mode (block cursor; the layout box shows the pane's BODY mode,
# which for this file pane is normal either way). The tag remembers where its
# cursor was; the first time there is nothing to remember and it starts on
# Save. The tag's normal mode is the body's: w selects the "Save" span exactly
# as a body word motion does, and the execute key runs the word under the
# cursor and hands the body back — same keys as the body, so Tab by default
# (see config.look_key/exec_key). `:` again backs out instead, leaving the tag
# as it was.
lines c.txt 6
start 31 100 c.txt
wait 8000 Newcol Joincol
wait 8000 c.txt
stable 700 20000
# edit line 1 so Save has something to write
key i
text ZZEDIT
key esc
settle 100
stable 400 5000
snap edited
# `:` -> the tag, in normal mode, cursor on Save
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
stable 600 8000
stable 400 5000
snap saved
snapfile written /tmp/pardes-snap/tagcmd/cwd/c.txt
# `:` then `:`: back to the body with the tag untouched, nothing run
key :
stable 400 5000
key :
stable 400 5000
snap escaped
|