patch 9.1.1177: filetype: tera files not detected Commit: https://github.com/vim/vim/commit/5daaf2326800ff0683a5be9a7f475667a4fc09db Author: MuntasirSZN <muntasir.joypur...@gmail.com> Date: Thu Mar 6 21:06:38 2025 +0100
patch 9.1.1177: filetype: tera files not detected Problem: filetype: tera files not detected Solution: detect '*.tera' files as tera filetype, include a simple filetype plugin (MuntasirSZN) closes: #16806 Signed-off-by: MuntasirSZN <muntasir.joypur...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 071553b9f..a71f01b29 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -295,6 +295,7 @@ runtime/ftplugin/systemverilog.vim @Kocha runtime/ftplugin/swig.vim @jmarrec runtime/ftplugin/tap.vim @petdance runtime/ftplugin/tcsh.vim @dkearns +runtime/ftplugin/tera.vim @MuntasirSZN runtime/ftplugin/terraform.vim @JannoTjarks runtime/ftplugin/tf.vim @ribru17 runtime/ftplugin/thrift.vim @jiangyinzuo diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 50c9f08f7..8b4091ae7 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: The Vim Project <https://github.com/vim/vim> -" Last Change: 2025 Mar 05 +" Last Change: 2025 Mar 06 " Former Maintainer: Bram Moolenaar <b...@vim.org> " Listen very carefully, I will say this only once @@ -2604,6 +2604,9 @@ au BufRead,BufNewFile *.ttl " Terminfo au BufNewFile,BufRead *.ti setf terminfo +" Tera +au BufRead,BufNewFile *.tera setf tera + " Terraform variables au BufRead,BufNewFile *.tfvars setf terraform-vars diff --git a/runtime/ftplugin/tera.vim b/runtime/ftplugin/tera.vim new file mode 100644 index 000000000..47636f29f --- /dev/null +++ b/runtime/ftplugin/tera.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin file +" Language: Tera +" Maintainer: Muntasir Mahmud <muntasir.joypur...@gmail.com> +" Last Change: 2025 Mar 06 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal commentstring={#\ %s\ #} + +let b:undo_ftplugin = "setlocal commentstring<" diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index d8fc0a1e0..b6beb3f5d 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -804,6 +804,7 @@ def s:GetFilenameChecks(): dict<list<string>> teal: ['file.tl'], templ: ['file.templ'], template: ['file.tmpl'], + tera: ['file.tera'], teraterm: ['file.ttl'], terminfo: ['file.ti'], 'terraform-vars': ['file.tfvars'], diff --git a/src/version.c b/src/version.c index 65c716929..790fc7d0d 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1177, /**/ 1176, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1tqHcd-00CWAk-AW%40256bit.org.