Friday, December 16, 2016

Re: job_start the make command

Shameless self promotion:

https://github.com/skywind3000/asyncrun.vim

an asynchronous :Make command can be easily defined by using AsyncRun:

:command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ <args>

Now, :Make works just like old :make but runs in background, errors will be matched by &errorformat and displayed to quickfix window as well.

Any shell command (not limited to &makeprg, &grepprg) can be execute like

:AsyncRun ls -la

Which is exactly the samething like old "!" command, but runs in background, errors will also be matched in quickfix window.

and many misc stuff:

1. macros like "%", "%<", ... in arguments can also be expanded.

2. autocommands about make or quickfix can be triggered before and after the job , your code in .vimrc can be triggered after before starting or after job finished (eg. you may want to connect the latest cscope file after it's been successfully generated in background).

3. global variable to indicate job status, which can be used to be displayed on your statusline.

4. Compatible from 7.4.1829 to the latest version.

5. Only one self-contained source file, asyncrun.vim.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment