For .js files, I set a particular filetype in order to enable snippets, like this:
au BufRead,BufNewFile *.js let g:airline_section_x='js'
and it kind of works. When I load the file via NERDTree, section_x stays the same, but when I switch from buffer to NERDTree and back to buffer, it then registers the new section_x and it works... but, airline doesn't do the 'normal' thing if I load any other filetype then. It stays 'js' throughout the vim session.
I am aware that I am most probably doing the stupid thing here, but I'm asking how should I do the right thing. How can I make this happen only for 'js' files and have it all work?