Thursday, July 17, 2014

Re: Question about setting default syntax highlighter

Le jeudi 17 juillet 2014 à 11:45, Carfield Yim a écrit:
> Hi, I need to use vim to edit config files for Visual Studio project
> a lot, all the config file are XML but edit with *.conf. How can I
> config vim to use XML syntax highlighter for all *.conf file?

See ":help new-filetype". You must do something like:

au BufNewFile,BufRead *.conf set filetype=xml

and save that in e.g. $HOME/.vim/ftdetect/filetype.vim.

Best,
Paul

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: