3

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.

skevelis
  • 61
  • 8

2 Answers2

4

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.

Matt
  • 13,674
  • 1
  • 18
  • 27
1

Try adding the line to the vimrc

au BufRead,BufNewFile *.h set filetype=c
Jossnix
  • 306
  • 1
  • 5