Open jshort opened 6 years ago
RFD:
When Vim starts up, after processing your .vimrc, it scans all directories in
'packpath' for plugins under the "pack/*/start" directory. First all those
directories are added to 'runtimepath'. Then all the plugins are loaded.
See packload-two-steps for how these two steps can be useful.
Workaround (or suggestion for the wiki regarding vim-airline integration):
If you are using Vim 8.0 or Neovim native package management, plugins are loaded after vimrc is loaded and therefore calling airline#section#create_right
will result in an Unknown function
error. Instead use an autocmd:
autocmd VimEnter * let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}'])
I will look into it, before that, you can initialize g:asyncrun_status
manually before airline#section#create_right
by
let g:asyncrun_status = 'stopped'
Alternative to this is to put airline
in your opt
directory, and then use packadd airline
to load it in your .vimrc
I am doing this for deoplete
, using https://github.com/k-takata/minpac
Without any plug-in, by the following addition to vimrc
, the status line shows in red letters when AsyncRun
is running, and otherwise keeps quiet:
function! AsyncRunStatline()
if g:asyncrun_status is# 'running'
return '[' . g:asyncrun_status . ']'
else
return ''
endif
endfunction
set statusline+=%#warningmsg#
set statusline+=%(%{AsyncRunStatline()}%)
Tested all recommendations, but no one works for me.
https://github.com/skywind3000/asyncrun.vim/issues/81#issuecomment-381561455 might not have worked because the check fails if done before loading :AsyncRun
. Please try again with it.
Other than that, perhaps something resets &statusline
? To see what, type :verb set statusline?
.
It worked, thank you!
I just migrated my (neo)vim setup to use the native package management in 8.0/neovim. While the recommendation of:
Worked with pathogen, it is not working now:
Same thing happens with both vim 8.0 path 1100 and neovim 0.2.1.
My vim-airline is working (other than this error section bit) so the plugin is loading.