{"id":13898732,"url":"https://github.com/mattn/vim-goimports","last_synced_at":"2025-04-14T06:21:20.017Z","repository":{"id":47410312,"uuid":"229174185","full_name":"mattn/vim-goimports","owner":"mattn","description":"Vim plugin for Minimalist Gopher","archived":false,"fork":false,"pushed_at":"2022-07-23T15:43:00.000Z","size":35,"stargazers_count":153,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T20:06:48.331Z","etag":null,"topics":["golang","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattn.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}},"created_at":"2019-12-20T02:23:12.000Z","updated_at":"2025-01-17T18:40:18.000Z","dependencies_parsed_at":"2022-07-26T11:00:06.361Z","dependency_job_id":null,"html_url":"https://github.com/mattn/vim-goimports","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/mattn%2Fvim-goimports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fvim-goimports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fvim-goimports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fvim-goimports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattn","download_url":"https://codeload.github.com/mattn/vim-goimports/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830879,"owners_count":21168360,"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":["golang","vim"],"created_at":"2024-08-06T18:04:25.903Z","updated_at":"2025-04-14T06:21:19.993Z","avatar_url":"https://github.com/mattn.png","language":"Vim script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# vim-goimports\n\nVim plugin for Minimalist Gopher\n\n## Features\n\n* Auto-formatting with `:w`\n* GoImport/GoImportAs\n\nThis plugin is mostly based on vim-go.\n\n## Will not do\n\n* Add new commands\n* Modify syntax\n\n## Usage\n\n```\n:w\n```\n\n## Installation\n\nFor [vim-plug](https://github.com/junegunn/vim-plug) plugin manager:\n\n```viml\nPlug 'mattn/vim-goimports'\n```\n\n## Configuration\n\n```viml\n\" enable auto format when write (default)\nlet g:goimports = 1\n\" disable auto format. but :GoImportRun will work.\nlet g:goimports = 0\n```\n\n* `g:goimports_simplify` - make simplify (a.k.a. `gofmt -s`) in formatting,\n  when make value of this `1` (default disabled).\n\n    ```viml\n    \" enable simplify filter\n    let g:goimports_simplify = 1\n    \" disable simplify filter\n    unlet! g:goimports_simplify\n    ```\n\n* `g:goimports_local` - use `-local` option when running `goimports`.\n  This is useful to import closed-source packages. (comma separated list)\n\n    ```viml\n    \" run goimports with `-local \"github.com/myrepo\"` option\n    let g:goimports_local = 'github.com/myrepo'\n    ```\n\n* To replace goimports command with the drop in replacement tool (e.g. [gofumpt](https://github.com/mvdan/gofumpt)).\n\n  ```viml\n  \" goimport (default)\n  let g:goimports_cmd = 'goimports'\n  let g:goimports_simplify_cmd = 'gofmt'\n  \n  \" gofumpt\n  let g:goimports_cmd = 'gofumports'\n  let g:goimports_simplify_cmd = 'gofumpt'\n  ```\n\n* To not trigger the location list if errors are present, you can use this option :\n  ```viml\n  \" default is 1\n  let g:goimports_show_loclist = 0\n  ```\n\n## Requirements\n\n* goimports\n* gofmt (optional: for `g:goimports_simplify = 1`)\n\n## License\n\nMIT\n\n## Author\n\nYasuhiro Matsumoto (a.k.a. mattn)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattn%2Fvim-goimports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattn%2Fvim-goimports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattn%2Fvim-goimports/lists"}