> > 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' > > Which line/paragraph ? Can you paste a n excerpt ? I don;t have > it in my filetype.txt doc. I have vim7.188 and I don't have this > functionality. > > About year ago I suggested such syntax -- 'set filetype=TYPE.SUBTYPE' > -- but I don't think it was accepted. I think vim does not have this. > Or is it some recent addition I'm not aware of ?
From: *options.txt* For Vim version 7.0. Last change: 2007 Mar 14 *'filetype'* *'ft'* 'filetype' 'ft' string (default: "") local to buffer {not in Vi} {not available when compiled without the |+autocmd| feature} When this option is set, the FileType autocommand event is triggered. All autocommands that match with the value of this option will be executed. Thus the value of 'filetype' is used in place of the file name. Otherwise this option does not always reflect the current file type. This option is normally set when the file type is detected. To enable this use the ":filetype on" command. |:filetype| Setting this option to a different value is most useful in a modeline, for a file for which the file type is not automatically recognized. Example, for in an IDL file: /* vim: set filetype=idl : */ ~ |FileType| |filetypes| When a dot appears in the value then this separates two filetype names. Example: /* vim: set filetype=c.doxygen : */ ~ This will use the "c" filetype first, then the "doxygen" filetype. This works both for filetype plugins and for syntax files. More than one dot may appear. Do not confuse this option with 'osfiletype', which is for the file type that is actually stored with the file. This option is not copied to another buffer, independent of the 's' or 'S' flag in 'cpoptions'. Only normal file name characters can be used, "/\*?[|<>" are illegal.