How to run long-running Crystal specs in Vim
vim-crystal is a great plugin, it brings a lot of stuff that helps us to work with most all Crystal’s features. Spec is one of those features. It is pretty easy to run specs for your project with a quick shortcut within vim. But it could be painful if you have a long running specs, because your editor will freeze and you will have to wait until all specs finish. What can we do ?
vim-dispatch is another cool vim plugin that will help.
Just use a :Dispatch command.
Here is an example of running specs in Crystal sources:
And if you want to run long specs for your Crystal project with standard structure, just type :Dispatch crystal spec.
Neovim also runs jobs in the background out of the box, and a related post shows how to switch to it from Vim.
Cheers!