summaryrefslogtreecommitdiff
path: root/tutor.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tutor.txt')
-rw-r--r--tutor.txt161
1 files changed, 91 insertions, 70 deletions
diff --git a/tutor.txt b/tutor.txt
index 1bdb9a9a..c2982fb7 100644
--- a/tutor.txt
+++ b/tutor.txt
@@ -24,8 +24,8 @@
This tutor is in THREE parts, ordered by what's most different from
editors you may know:
- PART 1 — the MOUSE. Acme's chording; nothing like Vim/Helix.
- PART 2 — the TTY. A terminal is just a pane; Enter positions you.
+ PART 1 — the MOUSE. Acme's three buttons; nothing like Vim/Helix.
+ PART 2 — the TTY. A terminal is just a pane; Ctrl-b drops into it.
PART 3 — the KEYS. Helix-style modal (with the Pardes differences).
PRACTICE BLOCKS (part 3): the "# keys:" line lists keystrokes
@@ -42,41 +42,49 @@
= PART 1 — THE MOUSE (acme chording; the most different part) =
=================================================================
- Acme's central idea: the THREE mouse buttons are a chording language
- over text. Pardes inherits this directly. (Vim and Helix have almost
- none of this — their mouse is for selection/scroll only.)
+ Acme's central idea: the THREE mouse buttons each ACT on text, and the
+ keyboard mirrors them. Pardes inherits this. (Vim and Helix have almost
+ none of it — their mouse is selection/scroll only.)
- LEFT (button 1) select text; a no-drag click also FOCUSES the
- pane and PINS the modal cursor where you click
- (so you can then edit there with the keyboard).
- MIDDLE (button 2) "execute" the selected text. Selecting a builtin
- name runs it; anything else is SENT to the shell
- the pane runs (if any). This is how you run a
- command you typed in text mode.
- RIGHT (button 3) "look" — resolve the word under the cursor as a
- path and open it: a directory opens/focuses a
- terminal there and ls's it; a file opens a file
- pane scrolled to a ":line" suffix if present.
+ ┌─────────┬─────────┬─────────┐
+ │ L │ M │ R │
+ │ (1) │ (2) │ (3) │
+ ├─────────┴─────────┴─────────┤
+ │ │
+ │ ( o ) │ the wheel scrolls the pane
+ │ │
+ └─────────────────────────────┘
- CHORDING (the acme magic): hold one button, press another. The
- classic is select-then-execute:
- - drag with LEFT to select a shell command you've typed
- - while STILL holding LEFT, press MIDDLE -> it runs
- - release both
- You can also select with LEFT then press RIGHT to "look" the selected
- word up as a file. Two-button chords = select-and-act in one gesture.
+ L select a plain click also FOCUSES the pane and PINS the modal
+ cursor where you click, so you can edit there next.
+ M execute run the selected text: a builtin name runs it, anything
+ else is SENT to the shell the pane runs. This is how you
+ run a command you typed in a text mode.
+ R look open the word under the cursor as a path: a directory
+ opens/focuses a terminal there and ls's it; a file opens
+ a file pane (scrolled to a ":line" suffix if present).
- THE TAG: every pane has a top bar (the "tag") — the pane's directory
- followed by the builtin command names (Newcol Delcol Del Tutor). It's just
- text: middle-click "Del" to close the window, "Newcol" to make a new
- column, "Delcol" to close the column, "Tutor" to spawn this tutor.
+ SELECT-THEN-ACT: there is no held-button chord. Instead:
+ - MIDDLE-drag over text selects AND runs it on release (one gesture);
+ a no-drag middle click auto-expands to the word under the cursor.
+ - or select with the keyboard (`v` chars / `x` lines), then press
+ Tab to execute or Enter to look — the acme chords on the keyboard.
+
+ THE TAG: each pane has a one-line tag: its MODE (nm/in/sy) + directory
+ or file path + the builtins "Del Delcol". Middle-click "Del" to close
+ the window, "Delcol" to close its column. A SEPARATE bar across the top
+ of the screen holds the window-agnostic builtins:
+ Kill Newcol Tutor Debug Colors NextColor
+ Middle-click "Newcol" for a new column, "Tutor" to spawn this tutor,
+ "Kill" to quit; Debug/Colors/NextColor toggle the stats overlay, the
+ syntax/ansi recolor, and the theme.
Right-click a directory in any body to open a terminal there.
- LAYOUT: columns split horizontally, windows stack in each column.
+ LAYOUT: columns split the screen; windows stack within a column.
- drag the VERTICAL gap between columns to resize
- drag the HORIZONTAL gap between stacked windows to resize
- - drag the red box (top-left of a pane) to MOVE a window between
- columns / reorder it
+ - drag the accent box (top-left of a pane; indigo-purple, brighter
+ when the pane is focused) to MOVE a window between columns / reorder
- the scrollbar is the gutter below the box: left-click scrolls UP
to that point, right-click scrolls DOWN
@@ -96,31 +104,34 @@
prompt model rather than layering an editor cursor on top.
On a terminal pane:
- NORMAL (nm) shows the REAL shell — prompts and typed input visible.
- You navigate the screen with the same h/j/k/l/w/b/e
- as a file pane.
- INSERT (in) hides the prompt rows — a clean compose surface
- (acme-style) where you type a command to run.
- TTY (sy) keys go straight to the shell as terminal input.
+ NORMAL (nm) prompt rows are HIDDEN — a clean acme-style page. You
+ navigate it with the same h/j/k/l/w/b/e as a file.
+ INSERT (in) same clean page; keys type an insertion overlay (the
+ command you're composing). Prompts still hidden.
+ TTY (sy) the REAL shell — prompts + typed input shown, and keys
+ go straight to the pty as terminal input.
+
+ ESC: insert -> normal. (Esc never reaches tty.)
+ Ctrl-b: toggles TTY on a terminal — the ONLY way in or out. Entering
+ is tty-native: if the shell is at a prompt and your modal
+ cursor sits on the input line, it first moves the shell's REAL
+ cursor to that spot —
+ - empty input -> shell cursor at the prompt START
+ - typed text -> shell cursor at/after the char you were on
+ via the shell's OSC 133 semantic prompt (ghostty promptClickMove;
+ our rc opts in with cl=line). The shell moves its own cursor with
+ arrow keys it understands — Pardes doesn't fake one on top.
- ESC: insert -> normal. (Never reaches tty.)
- ENTER: normal -> tty, AND moves the shell's REAL cursor to where
- your modal cursor was on the input line:
- - empty input -> shell cursor at the prompt START
- - typed text -> shell cursor at/after the char you
- navigated to (start-vs-end matters)
- This is tty-native: it reuses the shell's OSC 133 semantic
- prompt via ghostty's promptClickMove (our shell rc opts in
- with cl=line). The shell moves its own cursor with arrow keys
- it understands — Pardes doesn't fake a cursor on top.
+ ENTER / TAB (in normal) are NOT a way into tty — they're the acme mouse
+ chords on the keyboard: Enter = "look" (open the path under the cursor),
+ Tab = "execute". Both act on the selection if one is active.
- So the flow is: navigate the shell screen in normal, hit Enter exactly
- where you want to keep typing/editing, and you're IN the shell at that
+ So the flow is: navigate the hidden-prompt page in normal, hit Ctrl-b
+ where you want to keep typing, and you're IN the live shell at that
spot. No separate "terminal mode cursor" to reconcile.
- (Positioning needs a live shell + a pty; covered by the e2e suite,
- tests.zig step 4b: type ABCDEF, navigate to the F, Enter, type X ->
- ABCDEXF, proving the shell cursor moved mid-input.)
+ (The cursor positioning is enterTty's promptClickMove; it needs a live
+ shell at a prompt. Mouse/tty behavior is exercised by the e2e suite.)
=================================================================
@@ -130,11 +141,15 @@
Same core as Helix and Vim: a block cursor you move with h/j/k/l,
motions w/b/e, and you enter insert with i/a/o. The differences:
- - NO select mode / multi-cursor (Helix). Selection is LINE-first:
- `x` grows a line selection downward; d/c/y act on it.
- - NO verb+noun (Vim's dw, cw). Motions only MOVE. To delete a word
- you select its lines with x then d.
- - ESC never reaches tty. Enter does (on terminals).
+ - Selection is LINE-first: `x` grows a line selection downward.
+ There's also `v` for a CHARACTER range. No multi-cursor. d/c/y act
+ on whichever selection is active (else the current line).
+ - NO verb+noun (Vim's dw, cw). Motions only MOVE. To delete a word,
+ select it (`v` then motions, or `x` for whole lines) then `d`.
+ - ESC never reaches tty; it only does insert -> normal. Dropping a
+ terminal into the live shell is Ctrl-b (see Part 2).
+ - Enter / Tab in normal mirror the mouse: Enter = look (open the path
+ under the cursor), Tab = execute. `u` undo, `U` redo.
- Editing a file pane MUTATES real content; a terminal pane yanks
rendered text and pastes it as an insertion run (shell output
can't be deleted, only pasted text can).
@@ -347,9 +362,10 @@
= 3.6 VIEWPORT + PANES =
-----------------------------------------------------------------
- zt / zz / zb scroll so the cursor is at top/center/bottom
- Ctrl-d / Ctrl-u half-page down / up
- Ctrl-f / Ctrl-b full page down / up
+ zt / zz / zb scroll so the cursor is at top/center/bottom
+ Ctrl-d / Ctrl-u half-page down / up
+ Ctrl-f full page down. (Ctrl-b pages up on a file pane,
+ but on a terminal it's the tty toggle — see Part 2.)
Ctrl-w h/j/k/l focus the pane left/down/up/right
Alt-n new terminal below the active one
Alt-c move the active terminal into a fresh column
@@ -361,21 +377,26 @@
= SUMMARY =
=================================================================
- MOUSE (acme): L select/focus+pin M execute R look(open)
- chord L+M = select-and-run; tag builtins (Del, ...)
- TTY: terminal IS a pane; Enter from normal -> tty AT the
- cursor's spot (start if empty, mid-text otherwise)
- KEYS (helix): h j k l w b e 0 $ ^ gg G x d c y p i a I A o O
- zt zz zb Ctrl-d/u/f/b Ctrl-w hjkl Alt-n/c
+ MOUSE (acme): L select/focus+pin M execute R look(open)
+ select-then-act: middle-drag, or v/x then Tab
+ tag = mode + dir + "Del Delcol"; top bar = Kill Newcol
+ Tutor Debug Colors NextColor
+ TTY: a terminal IS a pane; Ctrl-b toggles the live shell,
+ landing its cursor where you navigated (prompt start if
+ the input is empty, mid-text otherwise)
+ KEYS (helix): h j k l w b e 0 $ ^ gg G v x d c y p i a I A o O
+ u undo U redo Enter=look Tab=execute
+ zt zz zb Ctrl-d/u Ctrl-f Ctrl-w hjkl Alt-n/c
- vs Helix: no select-mode, no multi-cursor; selection is LINE-first.
+ vs Helix: no multi-cursor; selection is LINE-first (x), plus v chars.
vs Vim: no verb+noun (dw); motions only move; Esc never reaches tty.
vs both: a terminal is just a pane; the same keys edit text and
- navigate the shell screen, and Enter reuses the shell's
+ navigate the shell screen, and Ctrl-b reuses the shell's
own prompt to position you precisely.
- To spawn THIS tutor again from anywhere: middle-click "Tutor" in any
- pane's tag (it's a builtin, next to Newcol/Delcol/Del).
+ To spawn THIS tutor again from anywhere: middle-click "Tutor" in the
+ top bar (next to Kill / Newcol).
Quit the tutor: this is a file pane — `:q` isn't wired; close the
- window (middle-click "Del" in the tag) or Ctrl-c the app.
+ window (middle-click "Del" in its tag), "Kill" (top bar) to quit
+ everything, or Ctrl-c the app.