{"id":22729254,"url":"https://github.com/freddez/html-indent","last_synced_at":"2026-04-19T03:04:05.602Z","repository":{"id":77441886,"uuid":"83153165","full_name":"freddez/html-indent","owner":"freddez","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-13T09:03:50.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T04:33:27.740Z","etag":null,"topics":["command-line","formatting","html","html-indent","indentation","indenter","rust","tool","vim"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freddez.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-25T18:31:59.000Z","updated_at":"2017-03-01T10:16:46.000Z","dependencies_parsed_at":"2023-02-26T10:00:29.226Z","dependency_job_id":null,"html_url":"https://github.com/freddez/html-indent","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/freddez/html-indent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fhtml-indent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fhtml-indent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fhtml-indent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fhtml-indent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freddez","download_url":"https://codeload.github.com/freddez/html-indent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fhtml-indent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268495891,"owners_count":24259397,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"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":["command-line","formatting","html","html-indent","indentation","indenter","rust","tool","vim"],"created_at":"2024-12-10T18:09:16.625Z","updated_at":"2026-04-19T03:04:00.570Z","avatar_url":"https://github.com/freddez.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"html-indent\n-----------\n\n`html-indent` is a html file indenter and checker.\n\nIt can be used for a single file, an entire tree, or from stdin (for editor\nplugin integration).\n\nIt supports multi-line tags, and preserves relative indentation in scripts and\ncomments sections. Except spaces, the document structure is preserved and the\nonly validation check is for balanced tags.\n\n### Command line options\n\n```\nUsage: html-indent [FILE] [options]\n\nOptions:\n    -h, --help          print this help menu\n    -r, --recursive     process all files in directory tree\n    -e, --extension ext file extension for recursive processing\n    -n, --dry-run       dry run, don't write files\n        --numeric       output indentation value\n    -c, --check         check malformed tags\n    -l, --lines [start]-[end]\n                        limit output to selected lines\n    -p, --print         print html result to stdout\n```\n\n\n### Installation\n\n`html-indent` is written in [Rust](http://rust-lang.org/). For the moment the\nonly option is to build it from source, so [install Rust](https://rustup.rs/)\nthen type\n\n```\n$ cargo install\n```\n\n### Editor integration\n\nThere is a [Vim](http://www.vim.org/) plugin under `tools`\ndirectory. Just drop it in `~/.vim/indent/` and don't forget to have\n```\nfiletype plugin indent on\n```\nin your `.vimrc`.\n\n### Known alternatives\n\n* [HTML Tidy](http://www.html-tidy.org/) : Tidy is designed to clean-up html\n  complete documents and I didn't succeed to indent html fragments with the\n  command line version.\n* [GNU Emacs](https://www.gnu.org/software/emacs/) ~~editor~~\n  ~~universe~~ environment. The included **html-mode**\n  and [web-mode](http://web-mode.org/), like many **Emacs**'s major\n  modes have implemented **indent-region** function.\n* [Atom](https://atom.io/) editor. Unfortunately, the indentation doesn't work\n  with newlines inside tags.\n\n### TODO\n\n- [ ] Better error handling\n- [ ] PHP integration\n- [ ] Sublime text plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreddez%2Fhtml-indent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreddez%2Fhtml-indent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreddez%2Fhtml-indent/lists"}