patch 9.2.0235: filetype: wks files are not recognized.
Commit:
https://github.com/vim/vim/commit/8c116bbe79eab7337bb5c979468d3b0cb5933d07
Author: Anakin Childerhose <
ana...@childerhose.ca>
Date: Mon Mar 23 19:40:12 2026 +0000
patch 9.2.0235: filetype: wks files are not recognized.
Problem: filetype: wks files are not recognized.
Solution: Detect *.wks, *.
wks.in and *.wks.inc as wks filetype,
include a filetype and syntax plugin (Anakin Childerhose)
The OpenEmbedded Image Creation tool, `wic` uses wic kickstarter files
to define image partition and bootloader layouts.
wks files can end with .wks, .
wks.in for templated wks files, and
.wks.inc for including in other .wks files.
The autocmd for *.wks.inc needs to come before *.inc in
runtime/ftdetect.vim
Reference:
https://docs.yoctoproject.org/ref-manual/kickstart.html#openembedded-kickstart-wks-reference
https://git.openembedded.org/openembedded-core/tree/scripts/lib/wic/canned-wks
closes: #19796
Signed-off-by: Anakin Childerhose <
ana...@childerhose.ca>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS
index cd965f767..c82e04a7b 100644
--- a/.github/MAINTAINERS
+++ b/.github/MAINTAINERS
@@ -350,6 +350,7 @@ runtime/ftplugin/vdf.vim @ObserverOfTime
runtime/ftplugin/vim.vim @dkearns
runtime/ftplugin/wget.vim @dkearns
runtime/ftplugin/wget2.vim @dkearns
+runtime/ftplugin/wks.vim @anakin4747
runtime/ftplugin/xcompose.vim @ObserverOfTime
runtime/ftplugin/xml.vim @chrisbra
runtime/ftplugin/xs.vim @petdance
@@ -710,6 +711,7 @@ runtime/syntax/vroom.vim @dbarnett
runtime/syntax/wdl.vim @zenmatic
runtime/syntax/wget.vim @dkearns
runtime/syntax/wget2.vim @dkearns
+runtime/syntax/wks.vim @anakin4747
runtime/syntax/xbl.vim @dkearns
runtime/syntax/xcompose.vim @ObserverOfTime
runtime/syntax/xml.vim @chrisbra
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 6252563dc..a63efb243 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: 2026 Mar 19
+" Last Change: 2026 Mar 23
" Former Maintainer: Bram Moolenaar <
Br...@vim.org>
" If the filetype can be detected from extension or file name(the final path component),
@@ -886,6 +886,9 @@ au BufNewFile,BufRead requires/*.txt setf requirements
" Pkl
au BufNewFile,BufRead *.pkl,*.pcf,pkl-lsp://* setf pkl
+" WIC kickstarter files
+au BufNewFile,BufRead *.wks,*.
wks.in,*.wks.inc setf wks
+
" Povray, Pascal, PHP or assembly
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
diff --git a/runtime/ftplugin/wks.vim b/runtime/ftplugin/wks.vim
new file mode 100644
index 000000000..c8d34818b
--- /dev/null
+++ b/runtime/ftplugin/wks.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin file
+" Language: OpenEmbedded Image Creator (WIC) Kickstarter files wks
+" Maintainer: Anakin Childerhose <
ana...@childerhose.ca>
+" Last Change: 2026 Mar 23
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal comments=:#
+setlocal commentstring=#\ %s
+
+let b:undo_ftplugin = 'setlocal com< cms<'
diff --git a/runtime/syntax/wks.vim b/runtime/syntax/wks.vim
new file mode 100644
index 000000000..1d242ada1
--- /dev/null
+++ b/runtime/syntax/wks.vim
@@ -0,0 +1,29 @@
+" Vim syntax file
+" Language: OpenEmbedded Image Creator (WIC) Kickstarter files wks
+" Maintainer: Anakin Childerhose <
ana...@childerhose.ca>
+" Last Change: 2026 Mar 23
+
+if exists("b:current_syntax")
+ finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+syn case match
+
+syn match wksComment "#.*$"
+syn match wksCommand "\<bootloader\>"
+syn match wksCommand "\<\(part\|partition\)\>" skipwhite nextgroup=wksMountPoint
+syn match wksMountPoint "\(/[^ ]*\|swap\)" contained
+
+syn match wksOption "--[a-zA-Z_-]\+"
+
+hi def link wksComment Comment
+hi def link wksCommand Statement
+hi def link wksMountPoint Identifier
+hi def link wksOption Special
+
+let b:current_syntax = "wks"
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index e13e6c4fa..056d2fe1b 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -964,6 +964,7 @@ def s:GetFilenameChecks(): dict<list<string>>
wgsl: ['file.wgsl'],
winbatch: ['file.wbt'],
wit: ['file.wit'],
+ wks: ['file.wks', '
file.wks.in', 'file.wks.inc'],
wml: ['file.wml'],
wsh: ['file.wsf', 'file.wsc'],
wsml: ['file.wsml'],
diff --git a/src/version.c b/src/version.c
index 9c99fa79b..1fdb6f68f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 235,
/**/
234,
/**/