Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

I believe it can be comma or space separated

Yes:

au BufNewFile,BufRead *.tbl,*.inc setf sql
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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