{"id":20315216,"url":"https://github.com/sysread/textsel","last_synced_at":"2026-05-07T22:40:16.007Z","repository":{"id":251431947,"uuid":"837401498","full_name":"sysread/textsel","owner":"sysread","description":"A TextView widget for rivo/tview that supports text selection.","archived":false,"fork":false,"pushed_at":"2024-08-10T20:21:03.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T05:58:45.214Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sysread.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","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":"2024-08-02T22:24:52.000Z","updated_at":"2024-08-10T20:20:31.000Z","dependencies_parsed_at":"2024-08-06T00:44:42.221Z","dependency_job_id":null,"html_url":"https://github.com/sysread/textsel","commit_stats":null,"previous_names":["sysread/textsel"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Ftextsel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Ftextsel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Ftextsel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Ftextsel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysread","download_url":"https://codeload.github.com/sysread/textsel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241818874,"owners_count":20025210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-14T18:18:20.105Z","updated_at":"2025-12-02T07:04:28.432Z","avatar_url":"https://github.com/sysread.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TextSel\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/sysread/textsel.svg)](https://pkg.go.dev/github.com/sysread/textsel#section-readme)\n\n`textsel` is a Go package that extends the `tview.TextView` widget to include\ncursor movement and text selection capabilities. It allows users to navigate\nand select text within the `TextView`, making it easier to copy and highlight\ntext.\n\n\n## Features\n\n- Cursor movement (up, down, left, right).\n- Text selection with visual highlighting.\n- Customizable colors for cursor and selection.\n\n## Installation\n\nTo install `textsel`, you need to have Go installed and set up on your machine.\nUse the following command to install the package:\n\n```bash\ngo get github.com/sysread/textsel\n```\n\n## Usage\n\nHere's an example of how to use `textsel` in your project:\n\n```go\npackage main\n\nimport (\n    \"github.com/sysread/textsel\"\n    \"github.com/rivo/tview\"\n)\n\nfunc main() {\n    app := tview.NewApplication()\n\n    textSel := textsel.NewTextSel().SetText(\"Hello, World!\")\n\n    if err := app.SetRoot(textSel, true).Run(); err != nil {\n        panic(err)\n    }\n}\n```\n\n## Customization\n\nYou can customize the colors used for cursor and selection highlighting by\nmodifying the `defaultColor`, `cursorColor`, `selectionColor`, and\n`cursorInSelectionColor` fields in the `TextSel` struct.\n\nExample:\n\n```go\ntextSel := textsel.NewTextSel()\ntextSel.defaultColor = \"[#FFFFFF:#000000:-]\"\ntextSel.cursorColor = \"[#000000:#FFFFFF:-]\"\ntextSel.selectionColor = \"[#000000:#FF0000:-]\"\ntextSel.cursorInSelectionColor = \"[#000000:#FF0000:bu]\"\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open an issue or submit a pull request with your improvements.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Ftextsel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysread%2Ftextsel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Ftextsel/lists"}