patch 9.1.0555: filetype: angular ft detection is still problematic
Problem: filetype: angular ft detection is still problematic
(after 9.1.0551)
Solution: detect htmlangular filetype only by inspecting the content,
do not try to determine it from a generic name like
'*.component.html'
For the reasons mentioned here:
https://github.com/vim/vim/pull/13594#issuecomment-1834465890
related: #15190
related: #13594
related: #13604
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 1a4195a..3c7d85c 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -407,10 +407,11 @@
var n = 1
# Test if the filename follows the Angular component template convention
- if expand('%:t') =~ '^.*\.component\.html$'
- setf htmlangular
- return
- endif
+ # Disabled for the reasons mentioned here: #13594
+ # if expand('%:t') =~ '^.*\.component\.html$'
+ # setf htmlangular
+ # return
+ # endif
while n < 40 && n <= line("$")
# Check for Angular