diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 18:29:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 00298cc24e12432a4120f4efb68728c008d9620f (patch) | |
| tree | 00b877bf32b2490191b7b797ca69491d2b9c0572 /docs/fs.md | |
| parent | 805197e5955a86afbb47bdb482a9ebb7cfa1d171 (diff) | |
| download | pardes-00298cc24e12432a4120f4efb68728c008d9620f.tar.gz pardes-00298cc24e12432a4120f4efb68728c008d9620f.zip | |
addr takes line:col, as Look's file:12:5 does
A script that knows a line and column had to count bytes to write #n. `12:5` is now the point at line 12, column 5 (bytes from 1, clamped to the line's end and snapped to a character's start, as Look's cursor is), and it composes like any simple address. A pardes extension, documented as one; sam reads it as a syntax error.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/fs.md')
| -rw-r--r-- | docs/fs.md | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -357,10 +357,20 @@ exec 3>&-`. The three range files `addr`, `dot` and `limit` each read the pair of offsets they also accept, so copying one onto another is all that acme's `addr=dot`, `dot=addr` and `limit=addr` ever were. A write is either that pair or an -address expression (`#0,#5`, `/pattern/`, `2+1`); `addr` selects what `data` +address expression (`#0,#5`, `/pattern/`, `2+1`, and pardes's own `12:5`, +below); `addr` selects what `data` and `xdata` read or replace, `dot` is the editor's own selection and moving it scrolls the pane into view, and `limit` bounds a search and reads empty until -it is set. Truncating a range file empties it; truncating `limit` lifts it. +it is set. Truncating `dot` empties it, truncating `limit` lifts it, and +truncating `addr` leaves it as it is (below). + +`line:col` is a pardes extension to sam's addresses, the spelling Look +takes in `file:12:5`: `12:5` is the point at line 12, column 5, and it +composes like any simple address (`12:5,14:1`, `12:5+#3`). The column is +in bytes from 1, as Look's is, clamped to the end of the line and snapped +back to the start of the character it falls in; a line past the end, or +column 0, is `address out of range`. sam would read `12:5` as a syntax +error. Truncating `data` or `xdata` deletes the range `addr` names and nothing else, so a shell's `echo NEW > data` replaces that range, `: > data` deletes it, and `>>` inserts at it; only truncating `body` empties the |
