-
Notifications
You must be signed in to change notification settings - Fork 30
Customize Runner
Linwei edited this page Jul 6, 2020
·
5 revisions
As a fully customizable plugin, this plugin allows you specify how to run your task by adding new item to dictionary g:asyncrun_runner
:
function! s:my_runner(opts)
echo "run: " . a:opts.cmd
endfunction
let g:asyncrun_runner = get(g:, 'asyncrun_runner', {})
let g:asyncrun_runner.test = function('s:my_runner')
Then, you can change g:asynctasks_term_pos
to "test"
, and when you are running your task, your runner function will be called. or add a "pos=test" filed in your task option, it will overshadow the global g:asynctasks_term_pos
.
Don't forget set output=terminal
in your task configuration.
For more information, see the wiki page of asyncrun.vim
: customize runner.