I'd like to combine two events: FileType
and TextChangedI
. According to this awesome book I can do that, by adding a comma between both events like this:
:autocmd BufWritePre,BufRead *.html :normal gg=G
But if I try that with FileType
and TextChangedI
like that:
autocmd TextChangedI,FileType c echom "Test"
then I don't get any output if I change something in a c
file. How can I achieve that?
TextChangedI
matches against the filename, andFileType
against the filetype, you can't really combine those two.<buffer>
is a special pattern which matches against the current buffer.<buffer>
stuff? I’ve removed the second question. You should feel free to post it separately!