{"id":25905545,"url":"https://github.com/mutokrm/knit-editor","last_synced_at":"2026-06-05T02:31:16.705Z","repository":{"id":278694807,"uuid":"934543986","full_name":"mutokrm/knit-editor","owner":"mutokrm","description":"A simple command-line text editor written in Kotlin.","archived":false,"fork":false,"pushed_at":"2025-02-21T08:43:19.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T05:59:23.340Z","etag":null,"topics":["cli","kotlin","text-editor"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/mutokrm.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}},"created_at":"2025-02-18T02:28:47.000Z","updated_at":"2025-02-21T08:43:22.000Z","dependencies_parsed_at":"2025-02-21T07:29:00.428Z","dependency_job_id":"ea0fe6d0-9c1b-45f1-a82b-ecfc06d90ea0","html_url":"https://github.com/mutokrm/knit-editor","commit_stats":null,"previous_names":["walnut07/knit-editor","mutokrm/knit-editor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mutokrm/knit-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fknit-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fknit-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fknit-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fknit-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mutokrm","download_url":"https://codeload.github.com/mutokrm/knit-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fknit-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33927314,"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-05T02:00:06.157Z","response_time":120,"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","kotlin","text-editor"],"created_at":"2025-03-03T05:15:23.615Z","updated_at":"2026-06-05T02:31:16.691Z","avatar_url":"https://github.com/mutokrm.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Knit`: A command-line text editor written in Kotlin.\n\nWelcome to Knit, a command-line text editor written in Kotlin. \n\nIn this personal project, I build my own text editor with only basic features, using Kotlin.\n\n\u003e [!NOTE]\n\u003e 1. I started this project for learning purposes. Please do not use Knit for serious editing work—but feel free to play around with it!\n\u003e 2. I’m writing a tutorial on how to craft a text editor in Kotlin. I’ll announce it on my blog (mtkrm.com) once it’s ready.\n\nhttps://github.com/user-attachments/assets/4b62aa62-2076-4fec-b958-0634eef0a17b\n\n## How it stores text buffer: Doubly-Linked List\nKnit uses **a doubly-linked list** to manage its text buffer. \nEach line of text is stored as a node in the list. This allows efficient insertion and deletion between lines while modifying a line can be expensive.\n\n```\nHello, World!\nThis is Knit.\nGoodbye!\n  +-------------------------+     +-------------------------+     +---------------------+\n  |        Line 1           | \u003c-\u003e |         Line 2          | \u003c-\u003e |       Line 3        |\n  | \"Hello, World!\"         |     | \"This is Knit.\"         |     | \"Goodbye!\"          |\n  | prev: null              |     | prev: Line 1            |     | prev: Line 2        |\n  | next: Line 2            |     | next: Line 3            |     | next: null          |\n  +-------------------------+     +-------------------------+     +---------------------+\n```\n\n## How to Try Knit\n\n1. **Generate the JAR File**\n    - After cloning this repo, run:\n      ```bash\n      ./gradlew shadowJar\n      ```\n    - The JAR file (e.g. `knit-0.1.jar`) will be generated in the `build/libs/` folder.\n\n2. **Run the JAR File**\n    - In the terminal, run:\n      ```bash\n      java -jar build/libs/knit-1.0.jar\n      ```\n    - This will launch Knit in your terminal.\n\n## Features\n- [x] **Arrows**\n    - [x] Supports up, down, left, and right arrow keys.\n    - [ ] Missing support for jump moves (Command + arrow keys).\n\n- [x] **Text Input**\n    - [x] Inserts characters at the cursor position.\n\n- [x] **Commands**\n    - [x] Supports Enter/Line Feed, Carriage Return, and Delete.\n    - [ ] Missing support for saving the text buffer to a designated file (currently, it only displays the buffer).\n    - [ ] Missing support for Quit, Save, Exit, and many other commands.\n\n- [ ] **Ambitious Goals**\n    - [ ] Undo/redo functionality.\n    - [ ] Copy/paste functionality.\n    - [ ] Syntax highlighting.\n\n## Guide to the codebase\n- Main application logic: `Main.kt`, `EditorApp.kt`\n- User input handling: `controller/`\n- State management: `managers/`\n- Data models: `models/`\n- Testing: tests for controllers are located in `src/test/kotlin/controller/`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutokrm%2Fknit-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmutokrm%2Fknit-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutokrm%2Fknit-editor/lists"}