Hi, Michael Wookey schrieb: > I have the following in my .vimrc: > > filetype plugin indent on > autocmd FileType c,h,cpp,hpp,cs setlocal cindent number cursorline > > If I have a new buffer and set the filetype as follows, everything works > just fine: > > :set filetype=c > > However, if I have a new buffer and I set the filetype like this, the > autocmd doesn't fire: > > :set filetype=c.doxygen > > This syntax is described in: > > :help 'filetype' > > The result is that I don't get cindent, number or cursorline set. > > I actually noticed this behaviour when a modeline in a C file set the > filetype to 'c.doxygen' and my options didn't appear. > > Does this work for anyone else or is it just my settings messing > something up? Vim build details are below.
the FileType event is only fired once with the exact filetype you specified in your set command, so you must additionally define the following autocommand: autocmd FileType c.doxygen setlocal cindent number cursorline Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
