1

I know a little bit of autocmd and use it for few things. Currently, I have

au BufNewFile,BufRead *.inc set filetype=sql
au BufNewFile,BufRead *.tbl set filetype=sql

Reading the man page, the general syntax is

:autocmd [group] {events} {file_pattern} [nested] {command}

I would like to know, whether I can combine the above 2 statements in a single lin i.e. how can we specify more that one file extension in the file_pattern section? The man page doesn't say about this, but I believe it can be comma or space separated. Any hints?

3

I believe it can be comma or space separated

Yes:

au BufNewFile,BufRead *.tbl,*.inc setf sql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.