From da5d023c97d7e156bc9e264cc9d8a9f473b9bba6 Mon Sep 17 00:00:00 2001 From: Jesse Atkinson Date: Sun, 22 Aug 2021 14:40:59 -0700 Subject: vim-patch:8.2.3358: structurizr files are not recognized (#15417) Problem: Structurizr files are not recognized. Solution: Recognize the file by contents. (Bastian Venthur, closes vim/vim#8764) https://github.com/vim/vim/commit/dea561111a5761bf99397a246b8baa43e73288de --- runtime/filetype.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 9c75a49ac1..333da58128 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -533,8 +533,13 @@ au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe setf dracula " Datascript au BufNewFile,BufRead *.ds setf datascript -" dsl -au BufNewFile,BufRead *.dsl setf dsl +" dsl: DSSSL or Structurizr +au BufNewFile,BufRead *.dsl + \ if getline(1) =~ '^\s*<\!' | + \ setf dsl | + \ else | + \ setf structurizr | + \ endif " DTD (Document Type Definition for XML) au BufNewFile,BufRead *.dtd setf dtd -- cgit