Posts Tagged ‘vim’

Vim syntax for xaml files

September 20th, 2009 2 comments

So you’re using Windows and want to edit your xaml files every once in a while with vi/vim/gvim, but vim doesn’t recognize xaml as an xml file and doesn’t give you nice syntax highlighting? Simple fix. In your home directory, create a vimfiles/ftdetect/myrules.vim file with the following contents:

" We set the type to XML only if no type was detected yet au BufRead,BufNewFile *.xaml setfiletype xml " OR unconditionally "au BufRead,BufNewFile *.xaml set filetype=xml
Categories: Uncategorized Tags: , ,