{"id":13912680,"url":"https://github.com/win7killer/vue-format","last_synced_at":"2025-07-18T12:32:19.346Z","repository":{"id":31826640,"uuid":"129034376","full_name":"win7killer/vue-format","owner":"win7killer","description":"VSCode extension, format single file with '.vue'.（VSCode 插件，格式化单文件“.vue”代码）","archived":false,"fork":false,"pushed_at":"2023-07-11T19:02:23.000Z","size":22840,"stargazers_count":47,"open_issues_count":25,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-08T01:56:43.246Z","etag":null,"topics":["format","js-beautify","pug-beautify","vscode","vue","vue-beauty","vue-format"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=febean.vue-format","language":"JavaScript","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/win7killer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-11T04:28:15.000Z","updated_at":"2023-10-24T08:46:47.000Z","dependencies_parsed_at":"2023-01-14T19:51:58.561Z","dependency_job_id":null,"html_url":"https://github.com/win7killer/vue-format","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win7killer%2Fvue-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win7killer%2Fvue-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win7killer%2Fvue-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win7killer%2Fvue-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/win7killer","download_url":"https://codeload.github.com/win7killer/vue-format/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226409840,"owners_count":17620717,"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":["format","js-beautify","pug-beautify","vscode","vue","vue-beauty","vue-format"],"created_at":"2024-08-07T01:01:44.453Z","updated_at":"2024-11-25T22:30:43.795Z","avatar_url":"https://github.com/win7killer.png","language":"JavaScript","readme":"# vue-format README\n\n- English: [./README_EN.md](./README_EN.md)\n- 中文: [./README.md](./README.md)\n\nFormat single file with '.vue' used in 'vscode' editor.（vscode 编辑器格式化插件，格式化单文件“.vue”文件代码）\nhttps://marketplace.visualstudio.com/items?itemName=febean.vue-format\n\u003e 如果你有问题或者需求，欢迎来提 issue。  https://github.com/win7killer/vue-format\n\n\u003e 你的 issue 就是我的原力.  `欢迎 STAR \u0026\u0026 FORK`\n\n\u003e 对 js-beautify 依赖很重，所以大部分都受 js-beautify 限制。理论上 js-beautify 的配置都可以适用。\n\n## Features\n\u003cimg src=\"https://raw.githubusercontent.com/win7killer/vue-format/master/images/command.gif\" alt=\"command\" width=600/\u003e\n\n## Requirements\n- js-beautify: [https://github.com/beautify-web/js-beautify](https://github.com/beautify-web/js-beautify)\n- pug-beautify: [https://github.com/vingorius/pug-beautify](https://github.com/vingorius/pug-beautify)\n\n## Keyboard Shortcuts\n- mac: `cmd+ctrl+p`\n- win: `alt+ctrl+p`\n\n## Extension Settings\n\n- 使用[js-beautify](https://github.com/beautify-web/js-beautify)配置 和 [pug-beautify](https://github.com/vingorius/pug-beautify)配置\n- indent_size 默认使用 editor.tabSize\n\n```jsonc\n{\n    \"html_indent_root\": false, // 是否缩进vue template中的根节点\n    \"break_attr_limit\": -1, // tag 的 attrs 大于该数值时，强制 attrs 换行，-1时不换行\n    \"attr_end_with_gt\": true, // break_attr_limit省生效时，tag的\"\u003e\"是否不换行，默认true\n    \"format_need\": [\"html\", \"js\", \"css\"], // vue单文件中需要格式化的语言，默认[\"html\", \"js\", \"css\"]。从数组中删除你不希望格式化的语言\n    \"js-beautify\": {\n        \"indent_size\": \"editor.tabSize\",\n        \"indent_char\": \" \",\n        \"indent_with_tabs\": false,\n        \"brace-style\": \"collapse\",\n        \"space_after_anon_function\": true,\n        \"css\": {},\n        \"js\": {},\n        \"html\": {\n            // \"force_format\": [\"template\"],\n            \"wrap_attributes\": \"auto\"\n        }\n    },\n    \"pug-beautify\": {\n        \"fill_tab\": false\n    }\n}\n\n```\n\n|Key|Example|Default|\n|---|---|---|\n|vue-format.html_indent_root|false|false|\n|vue-format.break_attr_limit|2|-1|\n|vue-format.attr_end_with_gt|true|true|\n|vue-format.format_need|[\"html\"]|[\"html\", \"js\", \"css\"]\n|vue-format.js-beautify|(See the config at front)|(See the config at front)\n|vue-format.pug-beautify|{fill_tab: false}|{fill_tab: false}\n\n\n## Changelog\nU can see the changelog in [CHANGELOG.md](./CHANGELOG.md)\n\n## Todo List\nSome things todo in [todo.md](./todo.md)\n","funding_links":[],"categories":["vue"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwin7killer%2Fvue-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwin7killer%2Fvue-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwin7killer%2Fvue-format/lists"}