- Notifications
You must be signed in to change notification settings - Fork116
Display Progress in Status Line or Airline
Linwei edited this pageMar 18, 2018 ·6 revisions
AsyncRun jobs have three states:running,success andfailure. You can edit your.vimrc to view these states in the quickfix windows' statusline:
letg:asyncrun_status="stopped"augroupQuickfixStatusau!BufWinEnter quickfixsetlocal\statusline=%t\[%{g:asyncrun_status}]\%{exists('w:quickfix_title')?\'\'.w:quickfix_title\:\''}\%=%-15(%l,%c%V%)\%PaugroupEND
Global variableg:asyncrun_status indicates the these three states:
- running: set when a async job is start
- success: set when exit normally which exit code is 0
- failure: set when exit abnormally which exit code is not 0
You can usevim-airline to indicate command status too:
Add these lines to your .vimrc:
letg:asyncrun_status="stopped"letg:airline_section_error=airline#section#create_right(['%{g:asyncrun_status}'])
Now, we havevim-airline cooperating with AsyncRun,you can adjust the position where g:asyncrun_status located by reading the help of airline.