Skip to content

Multiple run mode

Linwei edited this page Jan 9, 2020 · 22 revisions

There is a -mode=? option can allow you specify how to run your command.

Available modes

mode description
async default behavior, run async command and output to quickfix window
bang same as !
os (windows only) open a new cmd.exe window and run your command in it
term open a reusable builtin terminal window and run your command

Run command via traditional ! command

You may ask, why there is still a -mode=bang since you can use :!command directly. The reason is asyncrun can setup environment variables ($VIM_FILEPATH, $VIM_ROOT, .. etc) and can help you change directory (-cwd) before execution.

Run comand in a new cmd.exe window