Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 758
skevelis Avatar asked Jun 08 '26 17:06

skevelis


1 Answers

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.

like image 141
Matt Avatar answered Jun 10 '26 08:06

Matt