I want the filetype .my_cpp
and .my_cc
to behave exactly like C++ files in Vim. I have the following set:
autocmd BufNewFile,BufRead *.my_cc set syntax=cpp
autocmd BufNewFile,BufRead *.my_cpp set syntax=cpp
Although the syntax highlighting works, the indentation doesn't seem to be working like C++ at all. How can I fix this? I assume it would have something to do with indentexpr
but I don't know enough about Vim to make it work. Doing set indentexpr?
in an actual .cc
file gives me indentexpr=
, so I guess it's not set to anything?
I would appreciate any help on the matter.