patch 9.1.1829: filetype: KerML and SysML files are not recognized

Commit: 
https://github.com/vim/vim/commit/b73ccf7ff0326ece9c942127c1965475ad71b78a
Author: Daumantas Kavolis <[email protected]>
Date:   Sun Oct 5 13:37:00 2025 +0000

    patch 9.1.1829: filetype: KerML and SysML files are not recognized
    
    Problem:  filetype: KerML and SysML files are not recognized
    Solution: Detect *.kerml as kerml filetype, detect *.sysml as sysml
              filetype, include a kerml and sysml filetype plugin
              (Daumantas Kavolis)
    
    closes: #18476
    
    Signed-off-by: Daumantas Kavolis <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS
index f76fca089..b632c5085 100644
--- a/.github/MAINTAINERS
+++ b/.github/MAINTAINERS
@@ -214,6 +214,7 @@ runtime/ftplugin/julia.vim                          
@carlobaldassi
 runtime/ftplugin/just.vim                              @pbnj
 runtime/ftplugin/kconfig.vim                           @chrisbra
 runtime/ftplugin/kdl.vim                               @imsnif @jiangyinzuo
+runtime/ftplugin/kerml.vim                         @daumantas-kavolis-sensmetry
 runtime/ftplugin/kivy.vim                              @ribru17
 runtime/ftplugin/kotlin.vim                            @udalov
 runtime/ftplugin/lc.vim                                        @ribru17
@@ -296,6 +297,7 @@ runtime/ftplugin/sshdconfig.vim                             
@jiangyinzuo
 runtime/ftplugin/svelte.vim                            @igorlfs
 runtime/ftplugin/sway.vim                              @ribru17
 runtime/ftplugin/swayconfig.vim                                @jamespeapen
+runtime/ftplugin/sysml.vim                         @daumantas-kavolis-sensmetry
 runtime/ftplugin/systemverilog.vim                     @Kocha
 runtime/ftplugin/swig.vim                              @jmarrec
 runtime/ftplugin/tap.vim                               @petdance
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 662c3deac..688e783f0 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 Oct 03
+" Last Change:         2025 Oct 05
 " Former Maintainer:   Bram Moolenaar <[email protected]>
 
 " Listen very carefully, I will say this only once
@@ -1359,6 +1359,9 @@ endif
 " KDL
 au BufNewFile,BufRead *.kdl                    setf kdl
 
+" KerML
+au BufNewFile,BufRead *.kerml          setf kerml
+
 " Kixtart
 au BufNewFile,BufRead *.kix                    setf kix
 
@@ -2627,6 +2630,9 @@ au BufNewFile,BufRead *.svg                       setf svg
 " Surface
 au BufRead,BufNewFile *.sface                  setf surface
 
+" SysML
+au BufNewFile,BufReadPost *.sysml      setf sysml
+
 " LLVM TableGen
 au BufNewFile,BufRead *.td                     setf tablegen
 
diff --git a/runtime/ftplugin/kerml.vim b/runtime/ftplugin/kerml.vim
new file mode 100644
index 000000000..91f5f0f12
--- /dev/null
+++ b/runtime/ftplugin/kerml.vim
@@ -0,0 +1,23 @@
+" Vim filetype plugin
+" Language:         KerML
+" Author:           Daumantas Kavolis <[email protected]>
+" Last Change:      2025-10-03
+
+" Only do this when not done yet for this buffer
+if exists("b:did_ftplugin")
+  finish
+endif
+
+" Don't load another plugin for this buffer
+let b:did_ftplugin = 1
+
+" Set 'comments' to format dashed lists in comments.
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1://*,mb:*,ex:*/,:///,://
+setlocal commentstring=//*\ %s\ */
+
+" Set 'formatoptions' to break comment lines but not other lines,
+" and insert the comment leader when hitting <CR> or using "o"
+setlocal formatoptions-=t
+setlocal formatoptions+=croql
+
+let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<'
diff --git a/runtime/ftplugin/sysml.vim b/runtime/ftplugin/sysml.vim
new file mode 100644
index 000000000..d4cdb3181
--- /dev/null
+++ b/runtime/ftplugin/sysml.vim
@@ -0,0 +1,12 @@
+" Vim filetype plugin
+" Language:         SysML
+" Author:           Daumantas Kavolis <[email protected]>
+" Last Change:      2025-10-03
+
+" Only do this when not done yet for this buffer
+if exists("b:did_ftplugin")
+  finish
+endif
+
+" Behaves mostly just like KerML, only differs by keywords
+runtime! ftplugin/kerml.vim
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 19dd80782..4b10ccb63 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -423,6 +423,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     karel: ['file.kl', 'file.KL'],
     kconfig: ['Kconfig', 'Kconfig.debug', 'Kconfig.file', 'Config.in', 
'Config.in.host'],
     kdl: ['file.kdl'],
+    kerml: ['file.kerml'],
     kitty: ['kitty.conf', '~/.config/kitty/colorscheme.conf'],
     kivy: ['file.kv'],
     kix: ['file.kix'],
@@ -781,6 +782,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     swiftgyb: ['file.swift.gyb'],
     swig: ['file.swg', 'file.swig'],
     sysctl: ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf', 
'any/etc/sysctl.conf', 'any/etc/sysctl.d/file.conf'],
+    sysml: ['file.sysml'],
     systemd: ['any/systemd/file.automount', 'any/systemd/file.dnssd',
               'any/systemd/file.link', 'any/systemd/file.mount',
               'any/systemd/file.netdev', 'any/systemd/file.network',
diff --git a/src/version.c b/src/version.c
index d6b798e89..e8680b29a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1829,
 /**/
     1828,
 /**/

-- 
-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1v5P2x-00DR7c-Iu%40256bit.org.

Raspunde prin e-mail lui