Closed tamago324 closed 4 years ago
I see, will take a look later.
Thanks!
@tamago324 This is an issue from the built-in html.vim syntax file. It didn't distinct the normal script tag from the script tag with a non-standard type.
The workaround for this issue should be something like this:
augroup ft_html
au!
autocmd FileType html :syn region htmlTemplate matchgroup=htmlScriptTag start=+<script type="text/x-template"\_[^>]*>+ keepend end=+</script\_[^>]*>+ contains=@htmlTop
augroup END
You can add it to your vimrc. And it will be highlighted as below.
Note that the content inside the script tag can be highlighted well, but the script itself is not well highlighted.
Thank you for explaining carefully!
A deeper understanding of syntax highlight. I don't understand matchgroup yet, but I'll investigate more.
Thank you very much!
Thank you for a great plugin.
The highlight when the
<script>
tag type istext/x-template
is not as expected. In the above case, I want to highlight HTML instead of JavaScript.Is this fixable?
min_vimrc
sample.html