Expand description
The edit tool: several replacements in one file per call, applied in
order, each to the text the ones before it left, and all of them or
none. A byte-order mark and CRLF line endings are kept. Text that does
not match exactly may still match line by line once trailing
whitespace and typographic quotes, dashes and spaces are evened out, but
only where exactly one place in the file matches. The result names the
lines that now hold the changed text and shows them, with a few lines
around each, as the file now holds them; a failure says what to send
instead, with the closest text to an old_text that was not found.
Structs§
- Applied
- What
applymakes of a file’s text. - Edit
- Replaces text in a file. Publishes the file it changed
(
FilesChanged): its resolved path, and the whole diff. - Edit
Args - Arguments of
Edit. - Replacement
Functions§
- apply
- Makes
editstotext, the whole text of the file atpath, exactly asEditdoes, without touching the file: each edit is matched, exactly or loosely, against the text the edits before it left, and all are applied or none. A byte-order mark and CRLF line endings are kept.pathnames the file in theFileChangeand in an error.