Search code examples
cvimneovimvim-airline

Vim Airline interpreting .h files as cpp, not c


Whenever I create a .h file, Airline interprets it as a cpp file (in the filetype section). How do I set it to c?

I couldn't find an answer online, and I don't know in where to change the source code of Airline to do what I want.


Solution

  • Filetype is set by standard Vim ftplugin. To change the default

    let g:c_syntax_for_h = 1
    

    See :h c.vim for more options.