commit 1a02896e169b7e22c489dd5b7f60b570c496631e
parent 0ae8168c9974a3e673c6274d03cffef15f83795a
Author: zeertzjq <zeertzjq@outlook.com>
Date: Mon, 2 Mar 2026 08:43:54 +0800
vim-patch:14eddc7: runtime(xkb): Include a simple xkb ftplugin (#38121)
Problem: There is a xkb syntax, but no filetype plugin.
Solution: Create a filetype plugin and set the comment and commentstring
options for the xkb filetype (xkb = X keyboard extension)
closes: vim/vim#19537
https://github.com/vim/vim/commit/14eddc7d46f2e6830beb00834f33eb272d028e82
Co-authored-by: GX <59413576+gx089@users.noreply.github.com>
Diffstat:
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/runtime/ftplugin/xkb.vim b/runtime/ftplugin/xkb.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin
+" Language: xkb (X keyboard extension)
+" Maintainer: The Vim Project <https://github.com/vim/vim>
+" Last Change: 2026 Mar 01
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=://
+setl commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'