{"id":28320908,"url":"https://github.com/umaumax/vim-format","last_synced_at":"2025-11-09T11:03:22.810Z","repository":{"id":154771571,"uuid":"190595698","full_name":"umaumax/vim-format","owner":"umaumax","description":"vim plugin for misc files formatting","archived":false,"fork":false,"pushed_at":"2024-08-28T12:40:57.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-20T06:48:00.670Z","etag":null,"topics":["formatter","plugin","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","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/umaumax.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}},"created_at":"2019-06-06T14:28:30.000Z","updated_at":"2024-08-28T12:41:02.000Z","dependencies_parsed_at":"2024-02-10T16:31:51.802Z","dependency_job_id":"c5d9dee0-36d0-4236-b40e-073b385e68fd","html_url":"https://github.com/umaumax/vim-format","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/umaumax/vim-format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fvim-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fvim-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fvim-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fvim-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umaumax","download_url":"https://codeload.github.com/umaumax/vim-format/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fvim-format/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283496070,"owners_count":26845317,"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-11-09T02:00:05.828Z","response_time":62,"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":["formatter","plugin","vim"],"created_at":"2025-05-25T12:12:44.594Z","updated_at":"2025-11-09T11:03:22.794Z","avatar_url":"https://github.com/umaumax.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vim-format\n\nvim plugin for misc formatting\n\n## support format list\n* cmake\n* json\n* python\n* yaml\n* toml\n* sh,zsh\n* rust\n* nasm\n* golang\n* awk\n* perl\n\n### cmake - cmake_format\n[umaumax/cmake\\_format: Source code formatter for cmake listfiles\\.]( https://github.com/umaumax/cmake_format )\n``` bash\npip install https://github.com/umaumax/cmake_format/archive/master.tar.gz\n```\n\n### json - prettier, jq\nprettier\n``` bash\nnpm install -g prettier\n```\n\njq\n[Download jq]( https://stedolan.github.io/jq/download/ )\n``` bash\n# Mac OS X\nbrew install jq\n# Ubuntu\nsudo apt-get install jq\n```\n\n### python - autopep8\n[hhatto/autopep8: A tool that automatically formats Python code to conform to the PEP 8 style guide\\.]( https://github.com/hhatto/autopep8 )\n``` bash\npip install autopep8\n```\n\n### yaml - prettier / yamlfmt / align-yaml\n[gechr/yamlfmt: 📄 YAML file formatter]( https://github.com/gechr/yamlfmt )\n``` bash\ngo get -u github.com/gechr/yamlfmt\n```\n\n[align\\-yaml]( https://github.com/jonschlinkert/align-yaml )\n``` bash\nnpm install -g align-yaml\n```\n\n### toml - prettier\n``` bash\ncargo install taplo-cli\n\nnpm install prettier prettier-plugin-toml --save-dev --save-exact\n```\n\n### typescript - prettier\n\n### sh,zsh - shfmt\n[mvdan/sh: A shell parser, formatter, and interpreter \\(POSIX/Bash/mksh\\)]( https://github.com/mvdan/sh )\n\n### rust - rustfmt\n``` bash\nrustup component add rustfmt\n```\n`rustfmt`の仕様でファイル名を指定するとそのファイルを基準にして，各モジュールが適切に設定されているかを検査する\n\n一時ファイルを利用してファイルを保存すると，そのときにエラーが発生してしまう\n\nその一時ファイルを編集対象のファイルと同じディレクトリに配置すれば，その検査自体は問題ないが，\nフォーマットされた結果が，stdoutに他のファイルの結果を含めて出力されてしまう問題がある\n\n### nasm - nasmfmt\n[yamnikov\\-oleg/nasmfmt: Formatter for NASM source files]( https://github.com/yamnikov-oleg/nasmfmt )\n``` bash\ngo get -u github.com/yamnikov-oleg/nasmfmt\n```\n\n### prettier for json, toml, yaml, typescript, html\n``` bash\nnpm install prettier prettier-plugin-toml --save-dev --save-exact\n```\n\n### golang - gofmt\n\n### awk - gawk\n\n### perl - perltidy\n\n``` bash\n# mac\nbrew install perltidy\n\n# ubuntu\nsudo apt install -y perltidy\n```\n\n### lua - stylua\n[JohnnyMorganz/StyLua: An opinionated Lua code formatter]( https://github.com/JohnnyMorganz/StyLua )\n\n``` bash\ncargo install stylua\n```\n\n### kotlin - ktlint\n[pinterest/ktlint: An anti-bikeshedding Kotlin linter with built-in formatter]( https://github.com/pinterest/ktlint )\n\nNOTE: A shell command at `:KtFormat` always return true even if ktlint failed with error.\n\n----\n\n## how to use\n``` vim\nPlug 'umaumax/vim-format'\n\nlet g:my_format_flag=1\n\n\" auto setting\nlet g:vim_format_fmt_on_save = 1\nlet g:Vim_format_pre_hook = { key, args -\u003e g:my_format_flag }\n\n\" example of manual setting for json\nlet g:vim_format_fmt_on_save = 0\naugroup json_group\n  autocmd!\n  autocmd FileType json autocmd BufWinEnter *.json command! -bar Format :JsonFormat\n  autocmd FileType json autocmd BufWritePre *.json if g:my_format_flag | :JsonFormat | endif\n  autocmd FileType json autocmd! json_group FileType\naugroup END\n\n\" for original command\nlet g:vim_format_list={\n  \\ 'jenkins':{'autocmd':['*.groovy'],'cmds':[{'requirements':['goenkins-format'], 'shell':'cat {input_file} | goenkins-format'}]},\n  \\ }\n```\n\nThe plugin will automatically define the commands with the following rules.\n\ne.g.\n* key is python: PythonFormat\n* key is awk:    AwkFormat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumaumax%2Fvim-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumaumax%2Fvim-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumaumax%2Fvim-format/lists"}