{"id":51411661,"url":"https://github.com/excelano/nved","last_synced_at":"2026-07-04T15:02:57.531Z","repository":{"id":364642651,"uuid":"1267997297","full_name":"excelano/nved","owner":"excelano","description":"A small REPL-flavored terminal text editor — print a range by line number, climb in, and edit in place.","archived":false,"fork":false,"pushed_at":"2026-06-22T23:38:34.000Z","size":480,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-23T01:13:53.085Z","etag":null,"topics":["cli","command-line","csv","go","golang","line-editor","repl","terminal","text-editor"],"latest_commit_sha":null,"homepage":"https://excelano.com/nved/","language":"Go","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-06-13T03:39:08.000Z","updated_at":"2026-06-22T23:38:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/excelano/nved","commit_stats":null,"previous_names":["excelano/nved"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/excelano/nved","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fnved","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fnved/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fnved/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fnved/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/excelano","download_url":"https://codeload.github.com/excelano/nved/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fnved/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35125718,"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-07-04T02:00:05.987Z","response_time":113,"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":["cli","command-line","csv","go","golang","line-editor","repl","terminal","text-editor"],"created_at":"2026-07-04T15:02:56.793Z","updated_at":"2026-07-04T15:02:57.522Z","avatar_url":"https://github.com/excelano.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nved\n\nA small terminal text editor that feels like a REPL rather than a full-screen\napplication. You print a range of lines by number, climb into the printed block\nwith the arrow keys, and edit it in place. There is no alternate screen and no\ntakeover of your terminal: output scrolls normally and your scrollback stays\nintact, the way `cat` or an old line editor leaves it.\n\nnved is a from-scratch descendant of [ved](https://github.com/excelano/ved), an\n`ed` clone. Where ved replays commands against text, nved lets you move a real\ncursor through committed lines and change them directly. It is deliberately\nsmall and single-purpose — one window, one buffer — and best suited to dialing\nin a specific part of a file by line number, not to scrolling through large\nfiles.\n\n## Install\n\n### Debian and Ubuntu\n\nAdd the [Excelano apt repository](https://excelano.com/apt/) once (one-time setup):\n\n```sh\ncurl -fsSL https://excelano.com/apt/setup.sh | sudo sh\n```\n\nThen install it, so `apt upgrade` keeps it current:\n\n```sh\nsudo apt install nved\n```\n\n### Homebrew\n\nOn macOS or Linux, tap and trust the repository once — Homebrew gates third-party taps behind explicit trust (one-time setup):\n\n```sh\nbrew tap excelano/tap\nbrew trust excelano/tap\n```\n\nThen install it, so `brew upgrade` keeps it current:\n\n```sh\nbrew install nved\n```\n\n### Prebuilt binary (Linux and macOS, x86_64 and arm64)\n\n```sh\ncurl -fsSL https://raw.githubusercontent.com/excelano/nved/main/install.sh | sh\n```\n\nIf the installer needs to write to a root-owned directory like `/usr/local/bin` (typical when upgrading a previously sudo-installed copy), wrap `sh`, not `curl`:\n\n```sh\ncurl -fsSL https://raw.githubusercontent.com/excelano/nved/main/install.sh | sudo sh\n```\n\nPin a version with `NVED_VERSION=v1.2.1`, or install elsewhere with `NVED_INSTALL_DIR=$HOME/bin`. To uninstall: `curl -fsSL https://raw.githubusercontent.com/excelano/nved/main/uninstall.sh | sh` (or `sudo apt remove nved` if installed via apt).\n\n### Windows\n\nDownload the `windows_amd64` zip from the\n[releases page](https://github.com/excelano/nved/releases), unzip it, and run\n`nved.exe` from [Windows Terminal](https://aka.ms/terminal). nved draws with\nANSI escape sequences, which the modern terminal renders but the legacy console\nhost (`conhost`) does not — so a recent Windows 10 or 11 with Windows Terminal\nis the target.\n\n### Go\n\nWith a Go toolchain (any platform):\n\n```sh\ngo install github.com/excelano/nved@latest\n```\n\n### Build from source\n\n```sh\ngit clone https://github.com/excelano/nved\ncd nved\ngo build -o nved .\n```\n\nRequires Go 1.25 or newer.\n\n## How it works\n\nStart `nved` with a file name, or with no argument for an empty unnamed buffer.\nAt the `\u003e` prompt you address lines by number:\n\n| Command    | Effect                                  |\n|------------|-----------------------------------------|\n| `N`        | print line N                            |\n| `N.M`      | print lines N through M                 |\n| `N.`       | print from line N to the end            |\n| `.N`       | print from the start to line N          |\n| `.`        | print the whole file                    |\n| `$`        | print the last line                     |\n| `$-N`      | print the Nth line before the last      |\n| `head [N]` | print the first screenful, or the first N lines |\n| `tail [N]` | print the last screenful, or the last N lines |\n| `s [name]` | save; a name is required when unnamed (also `Ctrl+S`) |\n| `x`        | exit; warns once when dirty (also `Ctrl+X`, `q`, `quit`) |\n| `h`        | show the command and key reference (also `H`, `?`) |\n| `wrap on\\|off` | word-wrap long lines, or show one per row and pan sideways |\n\nThe `.` separator sits under the right hand on the numeric keypad, where there is\nno comma; a `,` works in its place anywhere — the two are interchangeable.\n\nA number can be offset from the end with `$-N`, so `$-9.$` is the last ten lines.\n`tail` is the everyday shorthand for that: bare `tail` brings the last screenful\non screen ready to climb into, and `tail 10` shows the last ten lines. `head` is\nits mirror at the top. The offset is `ed`'s address arithmetic, restricted to the\n`$` anchor since nved has no roaming current line.\n\nYou can also open straight to a range. A `+spec` argument — `spec` is any of the\ncommands above — runs once on startup, so the block is already on screen at the\nprompt:\n\n```sh\nnved +42 notes.txt        # open with line 42 printed\nnved +10.30 notes.txt     # ... lines 10 through 30\nnved +tail notes.txt      # ... the last screenful, ready to edit\n```\n\nOut-of-range numbers clamp to the nearest valid line. A range taller than the\nterminal prints one screenful from the top; **Page-Up** and **Page-Down** reprint\nthe screenful above or below so you can walk through it.\n\nThe printed block sits just above the prompt. Climb into it to edit:\n\n- **Up** lands on the bottom line, **Left** at the end of the last line, **Ctrl+Home** on the first line.\n- Arrows move the cursor; **Ctrl+Left** / **Ctrl+Right** skip by words; **Home** / **End** and **Ctrl+Home** / **Ctrl+End** jump to the edges.\n- **Enter** splits a line, **Backspace** and **Delete** join lines, typing inserts.\n- **Ctrl+U** undoes the last edit. The history lives with the buffer, so it works at the `\u003e` prompt too and survives climbing in and out — if the undone edit has scrolled off, nved reprints it.\n- **Ctrl+S** saves in place without leaving (your cursor stays put); **Ctrl+X** exits — the save and exit chords work while editing, just as at the prompt.\n- Leave the editor with **Esc** or **Ctrl+C**, or by stepping off the bottom (**Down**) or off the end of the last line (**Right**) — the mirror of how you climbed in.\n\nTwo structural edits are typed at the prompt rather than done with the cursor:\n`insert row [N]` — short `ir` — opens a blank line after line N (a bare `insert\nrow` appends at the end, `0` prepends), and `kill row N` (`kr`) deletes line N, or\nan `N.M` range. Deleting a range asks first; deleting a single line does not. Both\nare a single **Ctrl+U** undo, and a bare `rows` reports the line count.\n\nLong lines are word-wrapped by nved itself, with a continuation indent that lines\nthe wrapped text up under the gutter. `wrap off` turns that off: each line then\ntakes a single row, and a line wider than the terminal shows a faint `‹` or `›`\nwhere it runs off the side — climb in and the row pans sideways to follow the\ncursor, the gutter held fixed at the left. It is the plain-text counterpart of the\naligned column view's horizontal pan. `wrap on` restores wrapping, and a bare\n`wrap` reports the current setting. Edits stay inside the printed block; to edit\nelsewhere, print that range and climb into it.\n\n## Finding and replacing\n\n`find \u003cregex\u003e` — short `f` — searches the whole buffer for a Go regular expression\n(RE2), jumps to the first match, and highlights it; `find next` (or `fn`) steps to\nthe next one and wraps back to the top at the end. `replace /old/new/` (`r`) is its\ntwin: it highlights the first match *unchanged*, then each `replace next` (`rn`)\nswaps the highlighted match and advances, so you confirm each change as you go.\nWhen you would rather not step, `replace all /old/new/` (`ra`) swaps every match in\none undoable pass.\n\nThe delimiter is any non-letter character, so `replace ,old,new,` sidesteps\nescaping a slash, and capture groups expand in the replacement as `$1`, `$2`.\n**Ctrl+F** and **Ctrl+R** seed the prompt with `find ` and `replace `; after a\nmatch the prompt arms the next step, so **Enter** repeats it and **Esc** clears it,\nand climbing in with **Up** or **Left** drops the cursor straight onto the\nhighlighted match — find a line by its content, then edit it in place.\n\n## Viewing delimited files (CSV, TSV, DSV)\n\nA `.csv` is a text file, so nved opens it as plain text — nothing happens until\nyou ask. Set a delimiter and the printed block renders as aligned columns:\n\n```\n\u003e csv\n```\n\n`csv` is a preset; underneath it are independent switches you can set or tune on\ntheir own:\n\n| Command                | Effect                                                |\n|------------------------|-------------------------------------------------------|\n| `dsv C`                | split each line into columns on `C` — a character, or the name `tab` or `unit` |\n| `dsv off`              | back to plain text                                    |\n| `quotes on\\|off`       | respect `\"quoted,fields\"` when splitting              |\n| `headers on\\|off`      | draw line 1 as a faint column header, pinned when it scrolls off |\n| `linebreaks newline\\|record` | the record separator (`record` is the ASCII record separator, 0x1E) |\n| `csv` `tsv` `asv`      | presets — `csv` is `dsv ,` with quotes and headers on, `tsv` the same with tabs, `asv` the ASCII-separated set (`unit` between fields, `record` between rows); `csv off` (or `tsv`/`asv off`) is `dsv off` |\n\nEach switch invoked bare — `dsv`, `quotes`, `headers`, `linebreaks` — reports its\ncurrent state instead of changing it. Columns are sized to the widest cell on\nscreen, and the delimiter itself is drawn faint in the gap between them, so a row\nreads `a , b` — you see what actually separates the fields, the same reason\nquoted cells keep their quotes. A row wider than the terminal shows a faint `‹`\nor `›` where content runs off the side; climb in and the columns pan sideways to\nfollow the cursor, the way Page-Up and Page-Down follow it down the file, with\nthe line-number gutter held fixed at the left.\n\nThe two ASCII information separators are worth knowing: `unit` (0x1F) for fields\nand `record` (0x1E) for rows never occur in ordinary text, so a file delimited by\nthem needs no quoting or escaping at all — `asv` is the one-word way to read one.\n\nBecause the view is reached through ordinary commands, `+spec` opens straight into\nit:\n\n```sh\nnved +csv data.csv\nnved +asv data.bin\n```\n\nClimb into an aligned block and you edit it in place, cell by cell. `Tab` and\n`Shift-Tab` (or `Ctrl-Left` / `Ctrl-Right`) move field to field, and the grid\nre-aligns as you type — widen one cell and the columns below it shift to match.\nEditing changes the field value only: the delimiter key is swallowed, and\n`Enter`-split and row joins are suppressed, so you can't accidentally restructure\nthe file from inside a cell. The one exception is a quoted cell — inside the\nquotes the delimiter is data, so typing a comma in `\"a,b\"` works; to put one in a\nplain cell, quote it first by typing `\"` at each end.\n\nWhole columns and rows are edited by command rather than from inside a cell.\nColumns have no line number, so `columns` (or `c`) prints a faint letter ruler above\nthe grid, labelling them `A`, `B`, `C`… from the left the way a spreadsheet does;\n`insert column [L]` — short `ic` — adds an empty column before column L (a bare\n`insert column` appends, `ic A` prepends), and `kill column L` (`kc`) removes column\nL from every row after a confirmation, naming the column when headers are on. Row insert and delete —\n`insert row` / `ir` and `kill row` / `kr`, described above — work here too, the row\ninsert carrying one empty field per column so it lines up. Each column or row edit\nis a single undo; for free-form restructuring, `dsv off` returns to plain text.\n\nA quoted field keeps its quotes on screen and on save, so you always see which\ncells are quoted and which aren't.\n\n## Input encoding\n\nnved expects UTF-8. If the file looks like UTF-7 (the `+ACI-` escape that\nScoutbook exports emit) or carries a UTF-16 BOM, nved prints a warning at\nstartup with the `iconv` command needed to convert it. To avoid silently\ncorrupting a non-UTF-8 source by saving edits as UTF-8, `s` (save) refuses to\noverwrite the original file in that case — `s \u003cnewname\u003e` to a different file\nstill works, so you can dump the buffer somewhere else and then convert.\n\n## As your default editor\n\nnved honors the contract that `git`, `crontab -e`, and `sudoedit` expect of an\neditor: it takes the file as an argument, writes your changes back to that path\nwhen you save, and exits zero. Pair it with the `+.` start spec so the file is\nprinted and ready to climb into the moment it opens — without it nved comes up at\na bare prompt with nothing shown:\n\n```sh\nexport VISUAL=\"nved +.\"\ngit config --global core.editor \"nved +.\"\n```\n\nnved drives the terminal in raw mode, so it fits the `VISUAL` slot — the\nfull-screen editor — rather than `EDITOR`, the line-editor fallback some tools\nreach for when there is no usable terminal. If you want that slot filled too,\n[ved](https://github.com/excelano/ved) is the natural companion: an `ed`-style\nline editor that reads commands a line at a time, which is exactly what `EDITOR`\nis meant to name.\n\n```sh\nexport EDITOR=ved\n```\n\nA normal exit returns zero whether or not you saved, so quitting without writing\nleaves the file untouched — git then declines the empty commit, the same as\nbacking out of any editor without saving.\n\n## License\n\nMIT — see [LICENSE](LICENSE). Authored by David Anderson, with AI assistance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcelano%2Fnved","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcelano%2Fnved","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcelano%2Fnved/lists"}