{"id":35500233,"url":"https://github.com/edwardedmonds/edit","last_synced_at":"2026-01-28T01:13:36.342Z","repository":{"id":331508986,"uuid":"1126698293","full_name":"edwardedmonds/edit","owner":"edwardedmonds","description":"Enter. Delete. Insert. Type. — Fast terminal text editor in C with lazy loading, background search, multiple cursors, soft wrap, and themes. Single binary. Zero dependencies.","archived":false,"fork":false,"pushed_at":"2026-01-09T10:22:41.000Z","size":1631,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-09T10:52:25.877Z","etag":null,"topics":["c","cli","editor","multiple-cursors","nano-alternative","syntax-highlighting","terminal","terminal-editor","text-editor","tui","vim-alternative"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edwardedmonds.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":"SECURITY_AUDIT.md","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-01-02T12:18:18.000Z","updated_at":"2026-01-05T17:50:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/edwardedmonds/edit","commit_stats":null,"previous_names":["edwardedmonds/edit"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/edwardedmonds/edit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwardedmonds%2Fedit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwardedmonds%2Fedit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwardedmonds%2Fedit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwardedmonds%2Fedit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edwardedmonds","download_url":"https://codeload.github.com/edwardedmonds/edit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwardedmonds%2Fedit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28831240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","cli","editor","multiple-cursors","nano-alternative","syntax-highlighting","terminal","terminal-editor","text-editor","tui","vim-alternative"],"created_at":"2026-01-03T18:18:10.252Z","updated_at":"2026-01-28T01:13:36.334Z","avatar_url":"https://github.com/edwardedmonds.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edit\n\nA fast terminal text editor. Single binary. Zero dependencies.\n\n```bash\ngit clone https://github.com/edwardedmonds/edit.git \u0026\u0026 cd edit \u0026\u0026 make \u0026\u0026 ./edit\n```\n\n---\n\n## Why?\n\nTerminal editors sit on a spectrum. Nano is friendly but limited. Vim is powerful but requires years of practice. Edit occupies a different position: simple Alt-key shortcuts with sophisticated internals that handle large files, Unicode edge cases, and structural navigation.\n\nThis isn't a vim replacement—if you've invested years in vim, keep using it. This is for everyone else: developers who SSH into servers and need something better than nano, programmers who don't want to memorize command vocabularies, anyone who just wants to edit a file without launching Electron.\n\n## Features\n\n- **Instant file loading** via memory-mapped I/O—100MB files open as fast as 1KB files\n- **Full Unicode 17.0 support** with proper grapheme cluster navigation (emoji, combining characters)\n- **Syntax highlighting** for C and Markdown\n- **Bracket matching** with jump-to-match (O(1) lookup, not scanning)\n- **Background search** keeps UI responsive on large files\n- **Soft line wrapping** with word-boundary awareness\n- **Hybrid markdown mode** with live preview rendering\n- **Crash recovery** via automatic swap files\n- **Pipe support** for use in shell pipelines\n\n## Installation\n\n```bash\nmake              # Build\nmake install      # Install to ~/.local/bin\nmake uninstall    # Remove\n```\n\nRequires: C17 compiler (GCC or Clang), POSIX system. No external dependencies.\n\n## Keybindings\n\n### Files\n| Key | Action |\n|-----|--------|\n| Alt+S | Save |\n| Alt+Shift+S | Save As |\n| Alt+Q | Quit |\n| Alt+T | Cycle theme |\n| F1 | Toggle help |\n\n### Navigation\n| Key | Action |\n|-----|--------|\n| Arrows | Move cursor |\n| Ctrl+←/→ | Move by word |\n| Home/End | Line start/end |\n| Ctrl+Home/End | File start/end |\n| PgUp/PgDn | Page up/down |\n| Alt+G | Go to line |\n| Alt+] | Jump to matching bracket |\n\n### Selection\n| Key | Action |\n|-----|--------|\n| Shift+Arrows | Extend selection |\n| Ctrl+Shift+←/→ | Select by word |\n| Shift+Home/End | Select to line start/end |\n| Shift+PgUp/PgDn | Select by page |\n| Alt+A | Select all |\n| Alt+W | Select word |\n\n### Editing\n| Key | Action |\n|-----|--------|\n| Alt+C / Alt+X / Alt+V | Copy / Cut / Paste |\n| Alt+Z | Undo |\n| Alt+Shift+Z | Redo |\n| Alt+K | Delete line |\n| Alt+D | Duplicate line |\n| Alt+↑/↓ | Move line up/down |\n| Alt+/ | Toggle comment |\n| Tab / Shift+Tab | Indent / Outdent |\n\n### Search\n| Key | Action |\n|-----|--------|\n| Alt+F | Find |\n| Alt+N | Find next |\n| Alt+P | Find previous |\n\n**In search mode:**\n| Key | Action |\n|-----|--------|\n| Alt+C | Toggle case sensitivity |\n| Alt+W | Toggle whole word |\n| Alt+R | Toggle regex |\n| Escape | Cancel search |\n\n### View\n| Key | Action |\n|-----|--------|\n| Alt+L | Toggle line numbers |\n| Alt+Shift+W | Toggle whitespace |\n| Alt+Shift+C | Cycle color column |\n| Alt+M | Toggle hybrid markdown mode |\n| Alt+U | Check for updates |\n\n### Markdown Tables\n| Key | Action |\n|-----|--------|\n| Tab | Next cell |\n| Shift+Tab | Previous cell |\n| Space (on checkbox) | Toggle task checkbox |\n\n## Themes\n\nEdit includes built-in themes. Press **Alt+T** to cycle through them.\n\n### Custom Themes\n\nCreate `.ini` files in `~/.edit/themes/`:\n\n```ini\nname=My Theme\nbackground=#1a1a1a\nforeground=#d4d4d4\ncursor_line=#262626\nselection=#264f78\nsyntax_keyword=#569cd6\nsyntax_string=#ce9178\nsyntax_comment=#6a9955\n```\n\nColors use `#RRGGBB` format. Attributes (`bold`, `italic`, `dim`, `underline`) can be added with `_attr` suffix:\n\n```ini\nsyntax_keyword_attr=bold\nsyntax_comment_attr=italic+dim\n```\n\n## Pipe Mode\n\nEdit works in pipelines:\n\n```bash\n# Edit piped input\ncat data.txt | ./edit | grep pattern\n\n# Use as $EDITOR\nexport EDITOR=\"edit\"\ngit commit  # Opens edit for commit message\n```\n\nWhen stdin or stdout is a pipe, edit uses `/dev/tty` (or stderr as fallback) for the terminal interface.\n\n## Architecture\n\nEdit uses a **three-temperature memory system**:\n\n- **Cold lines**: Backed by mmap, zero heap allocation\n- **Warm lines**: Decoded to cells, metadata computed, mmap still valid  \n- **Hot lines**: Edited in memory, mmap stale\n\nThis means opening a 100MB file is instant—only visible lines consume memory.\n\nEach character is a 12-byte **cell** containing:\n- Unicode codepoint\n- Syntax token type\n- Word boundary classification (for Ctrl+Arrow navigation)\n- Bracket pair ID (for O(1) matching)\n\n**Background worker thread** handles:\n- Line warming ahead of viewport\n- Search on large files (\u003e5000 lines)\n- Autosave every 30 seconds\n\n## Custom Keybindings\n\nEdit supports custom keybindings via `~/.edit/keybindings.ini`:\n\n```ini\n[bindings]\nsave = Alt+S\nquit = Alt+Q\nundo = Alt+Z\n```\n\nSee `keybindings.example.ini` for all available actions.\n\n## Configuration\n\nEdit stores preferences in `~/.editrc`:\n\n```\ntheme=Solarized Dark\n```\n\n## Comparisons\n\n| | edit | vim | nano | VS Code |\n|--|------|-----|------|---------|\n| Learning curve | Minutes | Years | Minutes | Hours |\n| Memory | ~10MB | ~50MB | ~5MB | ~500MB |\n| Startup | \u003c10ms | ~50ms | \u003c10ms | 2-5s |\n| Large files | Instant | Good | Slow | Good |\n| Unicode | Full | Full | Basic | Full |\n| Plugins | No | Yes | No | Yes |\n\n**Use edit when:** You need something better than nano without the vim learning curve. Quick edits over SSH. Resource-constrained systems.\n\n**Use vim when:** You've already learned it. You need macros, plugins, or infinite customization.\n\n**Use VS Code when:** You need an IDE with LSP, debugging, and extensions.\n\n## Source Structure\n\n```\nsrc/\n├── main.c          # Entry point, signal handling\n├── edit.c          # Core editor logic\n├── buffer.c        # Line and buffer management\n├── syntax.c        # Highlighting (C, Markdown)\n├── theme.c         # Theme loading and rendering\n├── render.c        # Screen drawing\n├── input.c         # Keyboard and mouse handling\n├── search.c        # Find and replace\n├── undo.c          # Operation-based history\n├── worker.c        # Background thread\n├── dialog.c        # File browser, theme picker\n├── clipboard.c     # System clipboard (xclip/wl-copy)\n├── autosave.c      # Swap file management\n├── terminal.c      # Raw mode, window size\n├── keybindings.c   # Key mapping\n├── editor.c        # Editor state management\n├── update.c        # Update checking\n└── error.c         # Error handling\n\nlib/\n└── gstr/           # Embedded Unicode library\n```\n\n## License\n\nMIT. See LICENSE file.\n\n---\n\n*Edit is what happens when someone gets tired of explaining vim to new developers and tired of launching VS Code to change one line.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwardedmonds%2Fedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedwardedmonds%2Fedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwardedmonds%2Fedit/lists"}