Skip to content

Long Term Task

Linwei edited this page Mar 9, 2020 · 14 revisions

When there are tasks running for hours, here are some tips for you.

Enable Notification

[.test-help]
...
notify=echo

And you will receive a notification in your command line when the job finished:

Silent Quickfix

You can prevent quickfix open by:

[xxx]
...
silent=1

If there is a silent=1 in your task, quickfix window will not open automatically no matter g:asyncrun_open is set or not.

New Terminal Tab

Running your task in a new terminal tab can prevent interfering your current window layout:

Enable tab based terminal globally

let g:asynctasks_term_pos = 'tab'

Or enable tab terminal only for special task in the task options:

[xxx]
...
pos=tab

Prevent Focus Changing

When focus=0 provided in the task option, you can keep your current window/tab actived without switching to the internal terminal:

[xxx]
...
pos=tab
focus=0

After :AsyncTask xxx, a new terminal tab is created but not actived, you are still in your previous tab:

Clone this wiki locally