-
Notifications
You must be signed in to change notification settings - Fork 112
Replace old make command with AsyncRun
Linwei edited this page Oct 16, 2016
·
6 revisions
You can replace ':make ...' command to:
:AsyncRun -program=make @ ...
This option will allow asyncrun reading the content of &makeprg
and composite it with following command into a new one. And old ':make' command can be replaced with this option now:
:AsyncRun -program=make @ CFLAGS=-O2
The following '@' sign is a separator to indicate following string is the parameters of 'make'. The code above behaves exactly the same thing as ':make CFLAGS=-O2' but it will run in background now.
command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ <args>
If you add the line above to your .vimrc, you can have ':Make' to replace ':make' easily.