I am trying to enable
.xml syntax highlighting in Vim for
.xaml files since
.xaml files don't have syntax highlighting of its own. I came across a post on Stack Overflow which recommended to use
au BufNewFile,BufRead *.xaml setf xml but that did not provide syntax highlighting as soon as I open the
.xaml file. I can see below on the console that the
.xaml files are changed to
I tried what this post suggested:
autocmd BufEnter *.xaml :setlocal filetype=xml but this does not provide syntax highlighting either.
I even tried modifying it to:
autocmd BufEnter *.xaml :setlocal filetype=xml | syntax on but it causes several glitches and formats the syntax higlighting of all my other open tabs & windows as
.xml. Any suggestions are deeply appreciated. Thank you!