Plugin spotlight: vim-dispatch

Tim Pope supercharges the :make command, makes it asynchronous, and adds a whole bunch of syntactic sugar and additional commands to support its use. A big chunk of vim-dispatch became obsolete with Vim 8.1 rolling out terminal mode support, however, depending on your preferred workflow, integration with different terminal emulators can be very useful. You can get vim-dispatch from GitHub at https://github.com/tpope/vim-dispatch.

If you’re using vim-plug, you can install vim-dispatch by adding Plug 'tpope/vim-dispatch' to a list of your plugins and running :w | source $MYVIMRC | PlugInstall.

Here are some highlights:

  • :Make allows you to run a task in a different window (only if you're using tmux, iTerm, or cmd.exe)
  • :Make! kicks off a task in the background (only in tmux, Screen, iTerm, or cmd.exe)
  • :Dispatch allows you to combine :compiler <compiler-name> and :make into a single command, for example, :Dispatch testrb test/models/user_test.rb
  • :Dispatch can also just run arbitrary commands, for example, :Dispatch bundle install

If you find yourself using built-in :make a lot, you may want to give vim-dispatch a shot.

Technically, you can also run tests from vim-dispatch, but since tests normally don't provide standardized output, vim-dispatch cannot automatically populate the quickfix or the location lists.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.147.124