{"id":13498883,"url":"https://github.com/tpope/vim-dispatch","last_synced_at":"2025-04-11T06:26:37.494Z","repository":{"id":7788139,"uuid":"9158101","full_name":"tpope/vim-dispatch","owner":"tpope","description":"dispatch.vim: Asynchronous build and test dispatcher","archived":false,"fork":false,"pushed_at":"2024-09-02T19:34:27.000Z","size":376,"stargazers_count":2685,"open_issues_count":43,"forks_count":130,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-04-03T08:06:47.021Z","etag":null,"topics":["vim","vim-plugin","vimscript-4504"],"latest_commit_sha":null,"homepage":"https://www.vim.org/scripts/script.php?script_id=4504","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/tpope.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":"CONTRIBUTING.markdown","funding":".github/FUNDING.yml","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},"funding":{"github":"tpope"}},"created_at":"2013-04-01T23:12:29.000Z","updated_at":"2025-03-30T14:51:51.000Z","dependencies_parsed_at":"2022-07-14T10:31:23.378Z","dependency_job_id":"0ae5347a-22ee-4308-9864-83e3cf64946b","html_url":"https://github.com/tpope/vim-dispatch","commit_stats":{"total_commits":376,"total_committers":28,"mean_commits":"13.428571428571429","dds":0.08510638297872342,"last_synced_commit":"6cc2691576f97d43f8751664d1a1a908b99927e5"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-dispatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-dispatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-dispatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-dispatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpope","download_url":"https://codeload.github.com/tpope/vim-dispatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248353510,"owners_count":21089651,"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":["vim","vim-plugin","vimscript-4504"],"created_at":"2024-07-31T22:00:18.804Z","updated_at":"2025-04-11T06:26:37.458Z","avatar_url":"https://github.com/tpope.png","language":"Vim Script","readme":"# dispatch.vim\n\nLeverage the power of Vim's compiler plugins without being bound by\nsynchronicity.  Kick off builds and test suites using one of several\nasynchronous adapters (including tmux, screen, iTerm, Windows, and a headless\nmode), and when the job completes, errors will be loaded and parsed\nautomatically.\n\nIf that doesn't excite you, then perhaps [this video][teaser] will change your\nmind.\n\n[teaser]: http://vimeo.com/tpope/vim-dispatch-teaser\n\n## Installation\n\nInstall using your favorite package manager, or use Vim's built-in package\nsupport:\n\n    mkdir -p ~/.vim/pack/tpope/start\n    cd ~/.vim/pack/tpope/start\n    git clone https://tpope.io/vim/dispatch.git\n    vim -u NONE -c \"helptags dispatch/doc\" -c q\n\n\n## Usage\n\nThe core of Vim's compiler system is `:make`, a command similar to `:grep`\nthat runs a build tool and parses the resulting errors.  The default build\ntool is of course `make`, but you can switch it (and the associated error\nparser) with `:compiler`.  There are lots of built-in compilers, and they do\nmore than just compile things.  Plus you can make your own.\n\nWe'll start by looking at dispatch.vim's `:make` wrapper `:Make`, and then\nmove on to higher abstractions.\n\n### Foreground builds\n\nKick off quick tasks with `:Make`.  What happens next depends on which adapter\ntakes charge.\n\n* If you're in tmux, a small split will be opened at the bottom.\n* On Windows, a minimized cmd.exe window is spawned.\n* Otherwise, you get a plain old `:make` invocation.\n\nWhen the task completes, the window closes, the errors are loaded and parsed,\nand the quickfix window automatically opens.  At no point will your focus be\nstolen.\n\n### Background builds\n\nUse `:Make!` for longer running tasks, like \"run the entire test suite\".\n\n* If you're in tmux or GNU screen, a new window is created in the background.\n* Windows still spawns a minimized cmd.exe window.\n* Otherwise, you get a headless invocation.  You can't see it, but it's\n  running in the background.\n\nYou won't be interrupted with a quickfix window for a background build.\nInstead, open it at your leisure with `:Copen`.\n\nYou can also use `:Copen` on a build that's still running to retrieve and\nparse any errors that have already happened.\n\n### Compiler switching\n\nAs hinted earlier, it's easy to switch compilers.\n\n    :compiler rubyunit\n    :make test/models/user_test.rb\n\nWait, that's still twice as many commands as it needs to be.  Plus, it\nrequires you to make the leap from `testrb` (the executable) to `rubyunit`\n(the compiler plugin).  The `:Dispatch` command looks for a compiler for an\nexecutable and sets it up automatically.\n\n    :Dispatch testrb test/models/user_test.rb\n\nIf no compiler plugin is found, `:Dispatch` simply captures all output.\n\n    :Dispatch bundle install\n\nAs with `:make`, you can use `%` expansions for the current filename.\n\n    :Dispatch rspec %\n\nThe `:Dispatch` command switches the compiler back afterwards, so you can pick\na primary compiler for `:Make`, and use `:Dispatch` for secondary concerns.\n\n### Default dispatch\n\nWith no arguments, `:Dispatch` looks for a `b:dispatch` variable.  You\ncan set it interactively, or in an autocommand:\n\n    autocmd FileType java let b:dispatch = 'javac %'\n\nIf no `b:dispatch` is found, it falls back to `:Make`.\n\n`:Dispatch` makes a great map.  By default dispatch.vim provides `` `\u003cCR\u003e`` for\n`:Dispatch\u003cCR\u003e`.  You can find all default maps under `:h dispatch-maps`.\n\n### Focusing\n\nUse `:FocusDispatch` (or just `:Focus`) to temporarily, globally override the\ndefault dispatch:\n\n    :Focus rake spec:models\n\nNow every bare call to `:Dispatch` will call `:Dispatch rake spec:models`.\nYou'll be getting a lot of mileage out of that `:Dispatch` map.\n\nUse `:Focus!` to reset back to the default.\n\n### Spawning interactive processes\n\nSometimes you just want to kick off a process without any output capturing or\nerror parsing.  That's what `:Start` is for:\n\n    :Start lein repl\n\nUnlike `:Make`, the new window will be in focus, since the idea is that you\nwant to interact with it.  Use `:Start!` to launch it in the background.\n\n### Plugin support\n\nUsing dispatch.vim from a plugin is a simple matter of checking for and using\n`:Make` and `:Start` if they're available instead of `:make` and `:!`.  Your\nfavorite plugin already supports it, assuming your favorite plugin is\n[rails.vim](https://github.com/tpope/vim-rails).\n\n## FAQ\n\n\u003e How can I have `:Dispatch!` or `:Make!` open the quickfix window on\n\u003e completion?\n\nUse `:Dispatch` or `:Make`.  The entire point of the `!` is to run in the\nbackground without interrupting you.\n\n\u003e But that blocks Vim.\n\nThen the adapter in use doesn't support foreground builds.  Adjust your setup.\n\n## Self-Promotion\n\nLike dispatch.vim?  Follow the repository on\n[GitHub](https://github.com/tpope/vim-dispatch) and vote for it on\n[vim.org](http://www.vim.org/scripts/script.php?script_id=4504).  And if\nyou're feeling especially charitable, follow [tpope](http://tpo.pe/) on\n[Twitter](http://twitter.com/tpope) and\n[GitHub](https://github.com/tpope).\n\n## License\n\nCopyright © Tim Pope.  Distributed under the same terms as Vim itself.\nSee `:help license`.\n","funding_links":["https://github.com/sponsors/tpope"],"categories":["Vim","Vim Script","Vim script","Tools"],"sub_categories":["Plugins","Task Running"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fvim-dispatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpope%2Fvim-dispatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fvim-dispatch/lists"}