# HG changeset patch # User Christian Brabandt # Date 1713026702 -7200 # Node ID e2d3b44c5d4c994a66a0f2a4689384953e686d77 # Parent 2b9f39b87c93d64939cd212a269ab6afd8e862ff patch 9.1.0318: filetype: translate shell config files are not recognized Commit: https://github.com/vim/vim/commit/4b5cd7257ee99384940d5210cf50298ff925924e Author: Wu, Zhenyu Date: Sat Apr 13 18:28:28 2024 +0200 patch 9.1.0318: filetype: translate shell config files are not recognized Problem: filetype: translate shell config files are not recognized Solution: Detect 'init.trans', 'translate-shell' and '.trans' files as clojure (Wu, Zhenyu) See: https://github.com/soimort/translate-shell/wiki/Configuration closes: #14499 Signed-off-by: Wu, Zhenyu Signed-off-by: Christian Brabandt diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1017,6 +1017,9 @@ au BufRead,BufNewFile *.hoon setf hoon " Tilde (must be before HTML) au BufNewFile,BufRead *.t.html setf tilde +" Translate shell +au BufNewFile,BufRead init.trans,*/etc/translate-shell,.trans setf clojure + " HTML (.shtml and .stm for server side) au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() au BufNewFile,BufRead *.cshtml setf html diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -155,7 +155,7 @@ def s:GetFilenameChecks(): dict