Mercurial > vim
changeset 34917:e2d3b44c5d4c v9.1.0318
patch 9.1.0318: filetype: translate shell config files are not recognized
Commit: https://github.com/vim/vim/commit/4b5cd7257ee99384940d5210cf50298ff925924e
Author: Wu, Zhenyu <wuzhenyu@ustc.edu>
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 <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 13 Apr 2024 18:45:02 +0200 |
parents | 2b9f39b87c93 |
children | d30cd15f7990 |
files | runtime/filetype.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -155,7 +155,7 @@ def s:GetFilenameChecks(): dict<list<str chuck: ['file.ck'], cl: ['file.eni'], clean: ['file.dcl', 'file.icl'], - clojure: ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc'], + clojure: ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc', 'init.trans', 'any/etc/translate-shell', '.trans'], cmake: ['CMakeLists.txt', 'file.cmake', 'file.cmake.in'], cmod: ['file.cmod'], cmusrc: ['any/.cmus/autosave', 'any/.cmus/rc', 'any/.cmus/command-history', 'any/.cmus/file.theme', 'any/cmus/rc', 'any/cmus/file.theme', '/.cmus/autosave', '/.cmus/command-history', '/.cmus/file.theme', '/.cmus/rc', '/cmus/file.theme', '/cmus/rc'],