{"id":23416216,"url":"https://github.com/bluk/swifty-vim","last_synced_at":"2025-09-10T00:17:34.553Z","repository":{"id":110144335,"uuid":"155395887","full_name":"bluk/swifty-vim","owner":"bluk","description":"⌨️ A Vim plugin for Swift which provides file detection, syntax highlighting, support for compiling and running tests, and optional support for formatting and linting tools.","archived":false,"fork":false,"pushed_at":"2018-11-16T00:45:13.000Z","size":49,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T08:52:34.393Z","etag":null,"topics":["swift","vim","vim-plugin","vim-plugins","viml"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2018-10-30T14:06:45.000Z","updated_at":"2020-12-31T09:50:09.000Z","dependencies_parsed_at":"2023-08-31T23:02:04.622Z","dependency_job_id":null,"html_url":"https://github.com/bluk/swifty-vim","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bluk/swifty-vim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluk%2Fswifty-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluk%2Fswifty-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluk%2Fswifty-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluk%2Fswifty-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluk","download_url":"https://codeload.github.com/bluk/swifty-vim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluk%2Fswifty-vim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274390446,"owners_count":25276406,"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-09-09T02:00:10.223Z","response_time":80,"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":["swift","vim","vim-plugin","vim-plugins","viml"],"created_at":"2024-12-22T22:14:03.306Z","updated_at":"2025-09-10T00:17:34.519Z","avatar_url":"https://github.com/bluk.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⌨️ swifty-vim\n\nA [Vim][vim] plugin for [Swift][swift] which provides\nfile detection, syntax highlighting, support for compiling and\nrunning tests, and optional support for formatting and linting tools.\n\nIt is inspired by [vim-go][vim-go] and [rust.vim][rust_vim].\n\n## Requirements\n\n* Vim 8.0.0902 or greater\n* [Swift Toolchain][swift_toolchain_install] or Xcode\n* (Optional) [SwiftFormat][swiftformat]\n* (Optional) [SwiftLint][swiftlint]\n\n## Installation\n\nUse one of the following package managers:\n\n* [Vim 8 packages][vim8pack]:\n  * `git clone https://github.com/bluk/swifty-vim ~/.vim/pack/plugins/start/swifty-vim`\n* [Pathogen][pathogen]:\n  * `git clone --depth=1 https://github.com/bluk/swifty-vim.git ~/.vim/bundle/swifty-vim`\n* [vim-plug][vim-plug]:\n  * Add `Plug 'bluk/swifty-vim'` to `~/.vimrc`\n  * `:PlugInstall` or `$ vim +PlugInstall +qall`\n* [dein.vim][dein.vim]:\n  * Add `call dein#add('bluk/swifty-vim')` to `~/.vimrc`\n  * `:call dein#install()`\n* [Vundle][vundle]:\n  * Add `Plugin 'bluk/swifty-vim'` to `~/.vimrc`\n  * `:PluginInstall` or `$ vim +PluginInstall +qall`\n\n## Features\n\nThere are configuration options to customize the behavior of the key mappings\nand commands.\n\n### Swift Package Manager Support\n\nKey mappings and commands such as:\n\n* `:SwiftPMBuild` to build the current package source or tests.\n* `:SwiftPMTest` to run the package tests.\n* `:SwiftPMTestFunctionOnly` to run the current test under the cursor.\n* `:SwiftPMTestGenerateLinuxMain` to generate the code to run existing tests on Linux.\n* `:SwiftPMGenerateXcodeProject` to generate an Xcode project.\n\n### SwiftFormat Support\n\nKey mapping and command:\n\n* `:SwiftFormat` to format the current file.\n\n### SwiftLint Support\n\nKey mapping and command:\n\n* `:SwiftLint` to lint the current file.\n\n## Sample vimrc Configuration\n\nAdd the following to your `vimrc`:\n\n```vim\n\" Build the current Swift package. If in a 'Tests' directory, also build the tests.\nautocmd FileType swift nmap \u003cleader\u003eb \u003cPlug\u003e(swift-spm-build)\n\" Run the current Swift package tests.\nautocmd FileType swift nmap \u003cleader\u003et \u003cPlug\u003e(swift-spm-test)\n\" Run the test under the current cursor.\nautocmd FileType swift nmap \u003cleader\u003eft \u003cPlug\u003e(swift-spm-test-function-only)\n\" Run swift package generate-xcodeproj\nautocmd FileType swift nmap \u003cleader\u003esgx \u003cPlug\u003e(swift-spm-generate-xcodeproj)\n\" Run swift test --generate-linuxmain\nautocmd FileType swift nmap \u003cleader\u003esgl \u003cPlug\u003e(swift-spm-test-generate-linuxmain)\n\n\" Run SwiftFormat on save.\nlet g:swift_swiftformat_autosave = 1\n\" Run SwiftLint on save.\nlet g:swift_swiftlint_autosave = 1\n\" If there are errors during autosave, add all errors in the quickfix window.\nlet g:swift_list_type_commands = { 'Autosave': 'quickfix' }\n```\n\n## Documentation / Help\n\nHelp can be found in the included [documentation][doc_dir].\n\nRun `:help swifty-vim` in Vim. Helptags (`:Helptags`) may need to be generated\nfor navigation. See your plugin manager or the helptags documentation\n(`:help helptags`) for more information.\n\n## Related Links\n\nYou may be interested in other similar projects:\n\n* [Upcoming Apple Language Server Protocol support][apple_lsp] for code\n  completion, jump to definition, etc.\n* [swift.vim][swift_vim]\n* [vim-swift][vim-swift]\n\n## License\n\n[Apache-2.0 License][license]\n\n[license]: LICENSE\n[swift]: https://swift.org\n[vim]: https://www.vim.org\n[vim-go]: https://github.com/fatih/vim-go\n[rust_vim]: https://github.com/rust-lang/rust.vim/\n[swift_toolchain_install]: https://swift.org/getting-started/\n[swiftformat]: https://github.com/nicklockwood/SwiftFormat\n[swiftlint]: https://github.com/realm/SwiftLint\n[vim8pack]: http://vimhelp.appspot.com/repeat.txt.html#packages\n[pathogen]: https://github.com/tpope/vim-pathogen\n[vim-plug]: https://github.com/junegunn/vim-plug\n[dein.vim]: https://github.com/Shougo/dein.vim\n[vundle]: https://github.com/gmarik/vundle\n[doc_dir]: doc/\n[swift_vim]: https://github.com/keith/swift.vim\n[vim-swift]: https://github.com/toyamarinyon/vim-swift\n[apple_lsp]: https://forums.swift.org/t/new-lsp-language-service-supporting-swift-and-c-family-languages-for-any-editor-and-platform/17024\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluk%2Fswifty-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluk%2Fswifty-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluk%2Fswifty-vim/lists"}