pardes Cheatsheet

Cheatsheet

The mouse

left-clickselect, and focus the pane. On a tag: type there.
middle-clickExec the word or selection: a builtin, else a shell line.
right-clickLook: open the file, address, directory or URL, else find the word’s next place. Resting the pointer tints what right-click would take.
sweepdrag middle-click or right-click to Exec or Look exactly what you swept.
gripdrag the box left of a tag: up/down resizes, onto another column moves the pane. A column’s right edge drags its width.
Chords: hold the first, click the next
hold left, click middlecut the left-click selection
hold left, click rightpaste over it
hold left, click middle, then rightcopy: cut, then paste back, left-click still down
hold middle, click leftExec the word with the left-click selection as argument (Grep on a selected name)
hold middle, click rightcancel the sweep (hold right, click middle too)

Over a program that takes the mouse, Shift swaps: Shift-left-click selects, Shift-middle-click goes to the program. One button: Alt/Option-click is middle-click, Cmd/Super-click right-click, sweeps too (a terminal passes only Alt); Ctrl-click is a definition; a program that takes the mouse gets the plain click.

Tags

Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
New Tty Find Grep Joincol Delcol
/home/me/notes.txt Save Tty Collapse Del
/home/me/src Tty+bash Save Mode Filter Collapse Del
manual.pdf [1/12] Tty PdfSections PdfTint Collapse Del

Look addresses

Typed anywhere, then right-click or Enter:

file:12line 12
file:12:5line 12, byte column 5
file:/re/next match after the selection (file:0/re/: first)
:40the pane looked from, line 40 (:40:5, any address after :)
~/xhome; also in Save, Restore, pardes ~/x
@p3:12pane 3 by serial, a terminal’s lines too
src/a directory: a pane listing it; Get reads it again

Addresses are sam’s: #n, /re/, ?re?, $, a,b. → Reference: look and exec

Keys: normal mode

Helix-style: motions select, then an edit acts on the selection. Mode box: blank normal, ^ insert, $ raw terminal. Every helix key: its keymap.

h j k l w b emove; words select
gg gefirst line, last line
gh gl ^line start, end, first non-blank
x v %line, character select, all
;collapse to the cursor
d c ydelete, change, yank
p P Rpaste after, before, replace
u Uundo, redo
i a I A o Oinsert; Esc back to normal
s Sregex: a cursor per match, split
C ,cursor on next line; keep primary
/ n Nsearch, next, previous
mi mmtextobject, matching bracket
|pipe each selection through the shell
gd grdefinition, references (language server)
Ctrld Ctrluhalf page down, up
Enter TabLook, Exec the selection (like right-click, middle-click)
:to the pane’s tag and back

→ Guide: Keys

Keys: panes

Ctrlw h j k lthen a direction: focus a neighbour (not in insert or raw $)
Escback to the previous pane (raw: only at a prompt with nothing typed; insert: to normal)
ShiftEscback to the previous pane from any mode, with the kitty keyboard protocol or in the GUI; elsewhere a plain Esc
Ctrlo Ctrlijump history back, forward; this file first. Ctrli is Tab without the kitty protocol: SPCji
Altnnew terminal below
Altcmove the pane to a new column

The leader: SPC in normal mode

SPC?Help: every builtin
SPCfsSave
SPCfnNew
SPCffFind
SPCfgGrep
SPCfrRecent
SPCfcConfig
SPCdDel
SPCntTty
SPCn9Tty9p
SPCwhfocus left
SPCjjLast
SPCjlJumplist
SPCyclip yank
SPCpclip paste
SPCttThemes
SPCtnNextColor
SPCtwWrap
SPCcnNewcol
SPCcpPlacement
SPCsdDump
SPCsrRestore
SPCsaAttach
SPCsDDetach
SPChtTutor
SPChmMessages
SPCqExit

Terminals and commands

  • Ctrlb: raw ($) or normal. Mode cycles raw, normal, insert. Filter, Tty+bash.
  • middle-click on a non-builtin line runs it in a command pane:
    /home/me/src (make) exit 0 Kill Save Collapse Del
  • Kill make stops it; Exit quits. Repl python: .py clicks go to it.

Reviewing diffs

git diff output is a diff: right-click on a file line, an @@ or a line’s +/- jumps there. → Guide: Reviewing diffs

Finding things

Sessions

pardes --detach=work; --attach=work or Attach work; Detach leaves it running. → Guide: Sessions

Config

Config (SPCfc): ~/.config/pardes/init, a builtin a line (Theme atelier). DumpConfig: every setting. Dump / Restore: the workspace. → Guide: Config

Themes

Themes lists them; Theme name; NextColor ThemeFile x.zon. → Themes

The virtual filesystem (9P)

Pane shells get $PARDES_9P (the socket) and $PARDES_PANE (their own pane); a command clicked in a pane also gets $winid, the pane it was clicked in.

9ns --mntgen   # then m=$PARDES_MOUNT in every pane
9p -a "unix!$PARDES_9P" read index
/
├── index               a line per pane
├── look                write: a Look
├── exec                write: an Exec
├── log                 events; follow waits
└── pane/               
    ├── new             open: a new pane
    └── <n>/            
        ├── addr        where data reads, writes
        ├── ctl         builtins: Save, Edit …
        ├── body        its text (>> appends)
        ├── data        the text at addr
        ├── look        a Look here
        └── exec        an Exec here
echo notes.txt:12 > $m/pane/$n/look
echo /foo/ > $m/pane/$n/addr; printf bar > $m/pane/$n/data
echo 'Edit ,x/foo/c/bar/' > $m/pane/$n/ctl
exec 3<>$m/log; echo follow >&3; cat <&3

pardes FILE opens it here; EDITOR='pardes --wait'. → Reference