{"id":13877733,"url":"https://github.com/bomberstudios/Strip-Whitespace-On-Save.tmbundle","last_synced_at":"2025-07-16T13:32:30.273Z","repository":{"id":66463047,"uuid":"3256045","full_name":"bomberstudios/Strip-Whitespace-On-Save.tmbundle","owner":"bomberstudios","description":"TextMate 2 bundle: Strips trailing whitespace from current document when saving","archived":false,"fork":false,"pushed_at":"2017-09-15T07:31:47.000Z","size":14,"stargazers_count":127,"open_issues_count":3,"forks_count":22,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-08-07T08:09:01.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bomberstudios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2012-01-24T13:30:04.000Z","updated_at":"2024-07-22T02:01:37.000Z","dependencies_parsed_at":"2024-01-13T19:45:00.763Z","dependency_job_id":"248fdead-dd87-4b68-b611-989dbfcb0bd3","html_url":"https://github.com/bomberstudios/Strip-Whitespace-On-Save.tmbundle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bomberstudios%2FStrip-Whitespace-On-Save.tmbundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bomberstudios%2FStrip-Whitespace-On-Save.tmbundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bomberstudios%2FStrip-Whitespace-On-Save.tmbundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bomberstudios%2FStrip-Whitespace-On-Save.tmbundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bomberstudios","download_url":"https://codeload.github.com/bomberstudios/Strip-Whitespace-On-Save.tmbundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226134226,"owners_count":17578778,"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-08-06T08:01:21.281Z","updated_at":"2024-11-24T06:31:25.371Z","avatar_url":"https://github.com/bomberstudios.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# Strip Whitespace On Save\n\n**TextMate 2 bundle:** Strips trailing whitespace from current document when saving. Works nicely with my [Save On Focus Lost bundle][bomberstudios__Save-On-Focus-Lost.tmbundle]. \n\n- If you need whitespace highlighting, check Mads Hartmann's superb [Whitespace bundle][mads379__Whitespace.tmbundle]. \n- If you happen to need new lines at EOF, then check Mike Szyndel's [Ensure New Line at the EOF bundle][hajder__Ensure-New-Line-at-the-EOF.tmbundle], which is based on mine.\n\n[bomberstudios__Save-On-Focus-Lost.tmbundle]:  https://github.com/bomberstudios/Save-On-Focus-Lost.tmbundle\n[mads379__Whitespace.tmbundle]:                https://github.com/mads379/Whitespace.tmbundle\n[hajder__Ensure-New-Line-at-the-EOF.tmbundle]: https://github.com/hajder/Ensure-New-Line-at-the-EOF.tmbundle\n\n\n## Installation\n\n- Clone the git repo to `~/Library/Application\\ Support/TextMate/Bundles/Strip-Whitespace-On-Save.tmbundle`\n- Relaunch TextMate 2\n\n\n## Customization\n\nCustomizing the bundle is easy.\n\n\n### Using `.tm_properties`\n\nSuppose you want to avoid stripping white space on some specific files (like CSV and YAML). Just add the following to your `.tm_properties` file:\n\n```ini\n[*.csv]\nscopeAttributes = attr.keep-whitespace\n\n[*.yml]\nscopeAttributes = attr.keep-whitespace\n```\n\nIf you wanted to preserve whitespace for that messed-up whitespace project of yours, just drop this in its `.tm_properties` file:\n\n```ini\nscopeAttributes = attr.keep-whitespace\n```\n\nOf course, you can combine those two approaches for complete control over whitespace-stripping!\n\nIf you want to know which scope corresponds to each language, just hit \u003ckbd\u003e^⇧P\u003c/kbd\u003e (*Show Scope*) on a document of that type, and you'll get a nice tooltip with the scope namespaces that apply at the current cursor's position.\n\n\n### Without Using `.tm_properties`\n\nIf you can't (or don't want to) use `.tm_properties` files, just open the Bundle Editor (**Bundles menu ▶︎ Edit Bundles...** or pressing \u003ckbd\u003e^⌥⌘B\u003c/kbd\u003e) and add `-text.tabular.csv` in the command's *Scope Selector* field:\n\n![screenshot 2013-12-05 20 35 46](https://f.cloud.github.com/assets/3832/1686305/20f9cb7e-5de5-11e3-8b76-1c09d9e40137.png)\n\n- **To exclude multiple file types,** just add `(space)-scope.namespace`. \n  For example, to exclude CSV and YAML, write: `-text.tabular.csv -source.yaml`.\n- **To work _only_ on specific file types,** use the namespace only, without the minus sign (e.g., to strip only CSV files, write `text.tabular.csv`). \n- **To include multiple file types,** just add them separated by comma (i.e: `text.tabular.csv, source.yaml, text.html.markdown`).\n\n\n## Notes\n\n**You need to be using at least TextMate version 2.0.0-alpha.9317**. \n\nTo get the most recent nightly build, open **Preferences ▶︎ Software Update** and **\u003ckbd\u003e⌥\u003c/kbd\u003e-click the \"Check Now\"** button . This will grab the latest version, rather than the one you get by just clicking the button.\n\nEnjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbomberstudios%2FStrip-Whitespace-On-Save.tmbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbomberstudios%2FStrip-Whitespace-On-Save.tmbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbomberstudios%2FStrip-Whitespace-On-Save.tmbundle/lists"}