{"id":50493849,"url":"https://github.com/excelano/ved","last_synced_at":"2026-06-02T05:03:47.236Z","repository":{"id":350948595,"uuid":"1208895876","full_name":"excelano/ved","owner":"excelano","description":"The verbose ed — a drop-in compatible ed clone with friendly errors, written in pure-stdlib Rust","archived":false,"fork":false,"pushed_at":"2026-05-25T14:31:03.000Z","size":75,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T16:29:21.178Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://excelano.github.io/ved/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/excelano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-12T22:05:06.000Z","updated_at":"2026-05-25T14:31:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/excelano/ved","commit_stats":null,"previous_names":["anderix/ved","excelano/ved"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/excelano/ved","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fved","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fved/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fved/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fved/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/excelano","download_url":"https://codeload.github.com/excelano/ved/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fved/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33807005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T05:03:46.472Z","updated_at":"2026-06-02T05:03:47.230Z","avatar_url":"https://github.com/excelano.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ved — the verbose ed\n\nA drop-in compatible clone of [ed](https://www.gnu.org/software/ed/), the original Unix line editor, written in pure-stdlib Rust. ved adds friendly error messages, command confirmations, long-form command aliases, and a built-in help reference while preserving strict compatibility so any script written for real ed runs against ved unchanged.\n\n**Full tutorial:** [https://excelano.github.io/ved/](https://excelano.github.io/ved/)\n\n## Why\n\ned's one-character error messages and silent operations make it notoriously hard to learn. ved keeps ed's interface and behavior but tells you what happened: `deleted 3 lines (2-4)` instead of silence, `? no match` instead of `?`, and `help` prints a command reference without leaving the editor. If you already know ed, ved works exactly the same. If you're learning, ved explains what's going on.\n\n## Install\n\nThe fastest path on Linux or macOS is the prebuilt-binary installer:\n\n```sh\ncurl --proto '=https' --tlsv1.2 -LsSf https://github.com/excelano/ved/releases/latest/download/ved-installer.sh | sh\n```\n\nOn Windows, in PowerShell:\n\n```powershell\npowershell -ExecutionPolicy ByPass -c \"irm https://github.com/excelano/ved/releases/latest/download/ved-installer.ps1 | iex\"\n```\n\nThe installer downloads the right tarball for your platform from the GitHub release, verifies its checksum, and drops the binary into `~/.cargo/bin` (or the equivalent on Windows). If `ved` isn't found on your `PATH` after installation, ensure `~/.cargo/bin` is on it. Releases also ship raw tarballs (`ved-*.tar.xz` / `.zip`) for manual installation.\n\nTo uninstall, remove the binary: `rm ~/.cargo/bin/ved`. ved stores nothing else on disk.\n\n### Debian and Ubuntu\n\nInstall from the [Excelano apt repository](https://excelano.com/apt/), so `apt upgrade` keeps it current:\n\n```sh\ncurl -fsSL https://excelano.com/apt/setup.sh | sudo sh\nsudo apt install ved\n```\n\nThe apt package is currently amd64 only; arm64 ships with the next release. On arm64, use the prebuilt installer above.\n\n## Build from source\n\nved requires only a Rust toolchain (1.85+ for edition 2024). No external crates, no C dependencies, no runtime.\n\n```sh\ncd ved\ncargo build --release\n```\n\nThe binary is at `target/release/ved`. To install system-wide:\n\n```sh\nmake build                        # build as your user (needs cargo)\nsudo make install                 # copy binary to /usr/local/bin\nsudo make install PREFIX=/usr     # or specify a different prefix\n```\n\nTo run without installing:\n\n```sh\ncargo run -- -p '* '\n```\n\nThe `--` separates cargo's flags from ved's. `-p '* '` sets the command prompt (ed has no prompt by default).\n\n## Quick start\n\n```\n$ ved myfile.txt           # open a file\n135                        # ved prints the byte count\n* ,p                      # print all lines\nHello world\nThis is a test file\n* 1s/Hello/Goodbye/       # substitute on line 1\nGoodbye world\n* g/test/n                # print lines matching \"test\" with numbers\n2\tThis is a test file\n* w                        # write back to the file\n37\n* q                        # quit\n```\n\n## Commands\n\n| Command | Long form | Description |\n|---|---|---|\n| `[.]a` | `append` | Append text after the addressed line (end with `.`) |\n| `[.]i` | `insert` | Insert text before the addressed line (end with `.`) |\n| `[.,.]c` | `change` | Replace the addressed lines with new text (end with `.`) |\n| `[.,.]d` | `delete` | Delete the addressed lines |\n| `[.,.]p` | `print` | Print the addressed lines |\n| `[.,.]n` | `number` | Print with line numbers |\n| `[.,.]s/re/new/[g]` | | Substitute: replace regex matches in addressed lines |\n| `[.,.]g/re/cmd` | | Global: run a command on every line matching a regex |\n| `[.,.]v/re/cmd` | | Inverse global: run a command on lines NOT matching |\n| `[.,.]w [file]` | | Write the addressed lines (default: all) to a file |\n| `e [file]` | | Edit: replace the buffer with a file's contents |\n| `r [file]` | | Read: append a file's contents after the addressed line |\n| `q` | `quit` | Quit (warns on unsaved changes; repeat to force) |\n| `Q` | | Quit unconditionally |\n| `H` | `help` | Print the command reference |\n\n## Addresses\n\nAddresses specify which lines a command operates on. Most commands default to the current line (`.`).\n\n| Address | Meaning |\n|---|---|\n| `5` | Line 5 |\n| `.` | Current line |\n| `$` | Last line |\n| `+3` / `-1` | Relative to current line |\n| `,` | All lines (shorthand for `1,$`) |\n| `;` | Current line to end (shorthand for `.,$`) |\n| `2,7` | Lines 2 through 7 |\n\n## Regular expressions\n\nved implements POSIX Basic Regular Expressions (BRE) with a hand-written engine. No external regex library.\n\n| Syntax | Meaning |\n|---|---|\n| `.` | Any single character |\n| `*` | Zero or more of the preceding element |\n| `^` / `$` | Start / end of line anchors |\n| `[abc]` | Character class: matches a, b, or c |\n| `[^abc]` | Negated class: matches anything except a, b, c |\n| `[a-z]` | Range: matches any lowercase letter |\n| `\\(...\\)` | Capturing group |\n| `\\1` ... `\\9` | Backreference to captured group |\n\nIn replacement strings: `\u0026` expands to the whole match, `\\1`-`\\9` expand to captured groups, `\\\u0026` is a literal ampersand.\n\n## Implementation\n\n2,006 lines of Rust across four modules, zero dependencies, 76 tests.\n\n| Module | Lines | Purpose |\n|---|---|---|\n| `main.rs` | 753 | REPL, command dispatch, substitute/global/write/read |\n| `bre.rs` | 929 | BRE regex engine: compiler, matcher, replacement expander |\n| `address.rs` | 208 | Address parser and resolver |\n| `buffer.rs` | 116 | Line buffer with current-line tracking |\n\nThe BRE engine started as a translation of Rob Pike's ~30-line recursive matcher from \"The Practice of Programming,\" then grew bottom-up through a compile step (inspired by Ken Thompson's original ed), bracket expressions, capturing groups, and backreferences. The full history is in the git log.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcelano%2Fved","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcelano%2Fved","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcelano%2Fved/lists"}