{"id":26479448,"url":"https://github.com/soifou/sublime-shfmt","last_synced_at":"2026-02-22T20:38:56.437Z","repository":{"id":63540808,"uuid":"181686505","full_name":"soifou/sublime-shfmt","owner":"soifou","description":"Sublime Text 3/4 plugin to format your shell scripts using shfmt.","archived":false,"fork":false,"pushed_at":"2024-12-30T11:48:23.000Z","size":17,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-30T12:20:34.259Z","etag":null,"topics":["formatter-plugin","shfm","sublime-text-plugin"],"latest_commit_sha":null,"homepage":"","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/soifou.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":"2019-04-16T12:38:16.000Z","updated_at":"2024-12-30T11:48:27.000Z","dependencies_parsed_at":"2024-02-05T16:52:30.514Z","dependency_job_id":"5aaf35d8-2b20-4440-b94d-af8eb6b5cde7","html_url":"https://github.com/soifou/sublime-shfmt","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/soifou%2Fsublime-shfmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soifou%2Fsublime-shfmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soifou%2Fsublime-shfmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soifou%2Fsublime-shfmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soifou","download_url":"https://codeload.github.com/soifou/sublime-shfmt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244536441,"owners_count":20468349,"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":["formatter-plugin","shfm","sublime-text-plugin"],"created_at":"2025-03-20T01:55:11.345Z","updated_at":"2026-02-22T20:38:51.400Z","avatar_url":"https://github.com/soifou.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shfmt (Shell formatter)\n\nThis is a Sublime Text 3/4 plugin to format your shell scripts using [shfmt](https://github.com/mvdan/sh).\n\n## Features\n\n- Format current file, selections and scopes\n- Format current file on save\n- Minify current file\n\n## Requirements\n\nObviously shfmt, you can install it in many ways:\n\n```sh\napt install shfmt\npacman -Sy shfmt\nbrew install shfmt\n```\n\nAnd so on, I'm sure if you are here you already have it.\n\n## Installation\n\n**Not available on Package Control.**\n\nGit clone this repository directly in your packages folder.\n\n\u003e [!WARNING]\n\u003e The plugin name must be called `shfmt` not `sublime-shfmt`\n\n```sh\ncd ~/.config/sublime-text/Packages\ngit clone https://github.com/soifou/sublime-shfmt shfmt\n```\n\n## Configuration\n\n- Look at default values here `Preferences \u003e Package Settings \u003e Shfmt \u003e Settings - Default`.\n- Edit your user configuration file via `Preferences \u003e Package Settings \u003e Shfmt \u003e Settings - User`.\n- Override needed values.\n\nDefault configuration:\n\n```json\n{\n    \"paths\": {\n        \"linux\": \"\",\n        \"osx\": \"\",\n        \"windows\": \"\"\n    },\n    \"config\": {\n        // Turns on autoformatting on save\n        \"autoformat\": false,\n        // Autoformat: if scope contains any of these, it will be auto-formatted\n        \"autoformat_scopes\": [\"source.shell\"],\n        // Autoformat: if scope contains any of these, it will never be\n        // auto-formatted\n        \"autoformat_blacklisted_scopes\": [\"source.shell.nu\"],\n        // Indentation: 0 for tabs (default), \u003e0 for number of spaces\n        \"indent\": 4,\n        // Switch cases will be indented\n        \"switch_case_indent\": true,\n        // Binary operators like \u0026\u0026 and | may start a line\n        \"binary_ops_line_start\": true,\n        // Redirect operators will be followed by a space\n        \"redirect_ops_space\": true,\n        // Keep column alignment paddings\n        \"keep_column_align_paddings\": false,\n        // Function opening braces are placed on a separate line\n        \"func_opening_braces_separate_line\": false\n    }\n}\n```\n\nIf `shfmt` is available in your `$PATH` environment, you're already set!\n\nElse add manually the folder where `shfmt` live.\nFor instance, if `shfmt` live in `~/.bin/shfmt`, add the following value:\n\n```json\n\"paths\": {\n    \"linux\": \"~/.bin\",\n    \"osx\": \"\",\n    \"windows\": \"\"\n},\n```\n\n## Usage\n\n### Command Palette\n\n\u003cdl\u003e\n    \u003cdt\u003eFormat entire file:\u003c/dt\u003e\n    \u003cdd\u003e\u003ccode\u003eShfmt: Format file\u003c/code\u003e\u003c/dd\u003e\n    \u003cdt\u003eFormat one or more selections:\u003c/dt\u003e\n    \u003cdd\u003e\u003ccode\u003eShfmt: Format selection(s)\u003c/code\u003e\u003c/dd\u003e\n    \u003cdt\u003eMinify entire file:\u003c/dt\u003e\n    \u003cdd\u003e\u003ccode\u003eShfmt: Minify file\u003c/code\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\n### Hotkeys\n\nEntire file:\n\n- Linux: \u003ckbd\u003ealt+f\u003c/kbd\u003e\n- OS X: \u003ckbd\u003ectrl+f\u003c/kbd\u003e\n- Windows: \u003ckbd\u003ealt+f\u003c/kbd\u003e\n\nSelection(s):\n\n- Linux: \u003ckbd\u003ealt+shift+f\u003c/kbd\u003e\n- OS X: \u003ckbd\u003ectrl+shift+f\u003c/kbd\u003e\n- Windows: \u003ckbd\u003ealt+shift+f\u003c/kbd\u003e\n\nOr add a [custom key bindings](https://www.sublimetext.com/docs/settings.html) using the following commands:\n\n- `shfmt`\n- `shfmt_selection`\n- `shfmt_minify`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoifou%2Fsublime-shfmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoifou%2Fsublime-shfmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoifou%2Fsublime-shfmt/lists"}