:help airline
states that variables related to sections can be window-local. The example from help shows how to do it for a plugin:
function! MyPlugin(...)
if &filetype == 'MyPluginFileType'
let w:airline_section_a = 'MyPlugin'
let w:airline_section_b = '%f'
let w:airline_section_c = '%{MyPlugin#function()}'
let g:airline_variable_referenced_in_statusline = 'foo'
endif
endfunction
call airline#add_statusline_func('MyPlugin')
I want to know how can I do it from the window itself, or understand a proper way to configure autocmd
for this purpose. After executing :let w:airline_section_b = 'foo'
, the bar isn't updated. Is there a way to redraw it with new changes? I found :AirlineRefresh
, but it just resets everything to defaults.