{"id":19364498,"url":"https://github.com/math2001/textwidth","last_synced_at":"2026-06-19T00:31:14.889Z","repository":{"id":74807359,"uuid":"106247309","full_name":"math2001/textwidth","owner":"math2001","description":"My Sublime Text adaptation of VIM's textwidth option.","archived":false,"fork":false,"pushed_at":"2017-10-11T07:21:01.000Z","size":8,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T13:13:37.026Z","etag":null,"topics":["python","sublime-text","vim"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/math2001.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":"2017-10-09T06:58:25.000Z","updated_at":"2017-10-09T10:07:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bf6dcc6-cfc3-4eaf-89c7-f7484cfeb1fd","html_url":"https://github.com/math2001/textwidth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/math2001/textwidth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Ftextwidth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Ftextwidth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Ftextwidth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Ftextwidth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/math2001","download_url":"https://codeload.github.com/math2001/textwidth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Ftextwidth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34513020,"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-18T02:00:06.871Z","response_time":128,"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":["python","sublime-text","vim"],"created_at":"2024-11-10T07:37:32.552Z","updated_at":"2026-06-19T00:31:14.848Z","avatar_url":"https://github.com/math2001.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `textwidth`\n\n\u003ca href=\"https://gitmoji.carloscuesta.me\" target=\"_blank\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/2a4924a23bd9ef18afe793f4999b1b9ec474e48f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746d6f6a692d253230f09f989c253230f09f988d2d4646444436372e7376673f7374796c653d666c61742d737175617265\" alt=\"Gitmoji\" data-canonical-src=\"https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\nA little Sublime Text 3 plugin to automatically insert line breaks at a\nspecific column. It just splits *before* the word. It's my adaptation of vim's\n`textwidth` setting (which is the reason for this package name).\n\n## Usage\n\nThis plugin is useful for writing text (markdown, plain text, etc), as it\nautomatically insert a line break at x characters or less (it wouldn't split a\nword).\n\n### Enabling automatic wrapping\n\nIf you want to enable this behaviour everywhere, just add this to your global\nsettings:\n\n```json\n\"textwidth\": 80\n```\n\nI wouldn't recommend doing that though, it might be annoying when you're\nprogramming. If you just want this to work in Markdown for example:\n\n1. open a markdown file\n2. open the command palette (\u003ckbd\u003ectrl+shift+p\u003c/kbd\u003e)\n3. type `settings syntax specific` and hit \u003ckbd\u003eenter\u003c/kbd\u003e\n4. add the same code as above (`\"textwidth\": 80`) in there\n\nDone!\n\n### Manual reorganizing\n\nSometimes, you write a paragraph, but then you change some words, and the\nwrapping is just wrong.\n\nWell, you don't have to re do everything manually: you just need to run\n`textwidth` command. It'll reorganize the selection if there is some, or the\nparagraph you have a cursor in.\n\n#### Add it to the command palette\n\nCreate a file called `Default.sublime-commands` in your `User` directory, and\nwrite this:\n\n```json\n[\n    { \"caption\": \"Text Width: Wrap\", \"command\": \"textwidth\" }\n]\n```\n\n#### Bind a shortcut to it\n\nIn your keybinding file\n\n```json\n{\n    \"keys\": [\"alt+w\"],\n    \"command\": \"textwidth\"\n}\n```\n\n### For VIM users\n\nIf you use a vim emulating package, `gq` will re-wrap the selection. You can use\n`gqap` to wrap the current paragraph you're in (`gq` a paragraph).\n\n\n---\n\nHope you like it :heart:","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmath2001%2Ftextwidth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmath2001%2Ftextwidth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmath2001%2Ftextwidth/lists"}