Monday, September 30, 2019

Re: Set filetype for specific file?

Have you tried something like the following?

`autocmd BufNewFile,BufRead ~/foo.bar set filetype=myfiletype`

On Monday, September 30, 2019 at 1:44:31 PM UTC-4, vtadipatri wrote:
Is there a way to set the file type permanently for a specific file
(not based on extension)?
For example, if I have a file ~/dir/myfile.properties, I'd like to
always set the filetype to be sql, without having to run :set
filetype=sql every time I open the file.

Thanks,
Ven

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/07a31824-fbf0-42e1-b618-46911408125b%40googlegroups.com.

No comments: