Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp