]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0536: filetype: zone files are not recognized v9.1.0536
authorChristian Brabandt <cb@256bit.org>
Sat, 6 Jul 2024 15:39:18 +0000 (17:39 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 6 Jul 2024 15:39:18 +0000 (17:39 +0200)
Problem:  filetype: zone files are not recognized
          (rpdprd)
Solution: Detect '*.zone' files as bindzone filetype

fixes: #14222

Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
runtime/ftplugin/bindzone.vim [new file with mode: 0644]
src/testdir/test_filetype.vim
src/version.c

index c814baa2363c23379f22061f694c0002043607c7..ba22ad42073b5f328d75f2b8be1bb3d9159de1be 100644 (file)
@@ -256,6 +256,7 @@ au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key      setf named
 
 " BIND zone
 au BufNewFile,BufRead named.root               setf bindzone
+au BufNewFile,BufRead *.zone                   setf bindzone
 au BufNewFile,BufRead *.db                     call dist#ft#BindzoneCheck('')
 
 " Blade
diff --git a/runtime/ftplugin/bindzone.vim b/runtime/ftplugin/bindzone.vim
new file mode 100644 (file)
index 0000000..f9e5f4b
--- /dev/null
@@ -0,0 +1,16 @@
+" Vim filetype plugin file
+" Language:    bind zone file
+" Maintainer:  This runtime file is looking for a new maintainer.
+" Last Change: 2024 Jul 06
+
+if exists("b:did_ftplugin")
+  finish
+endif
+let b:did_ftplugin=1
+
+setlocal comments=b:;
+setlocal commentstring=;\ %s
+setlocal formatoptions-=t
+setlocal formatoptions+=crq
+
+let b:undo_ftplugin = "setlocal com< cms< fo<"
index a3d88910bc308c30e167faee59d562a4eaa9d5b4..d6491be4244c9ef5d26e22f4b28b8768e4dee695 100644 (file)
@@ -121,7 +121,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     beancount: ['file.beancount'],
     bib: ['file.bib'],
     bicep: ['file.bicep', 'file.bicepparam'],
-    bindzone: ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
+    bindzone: ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file', 'foobar.zone'],
     bitbake: ['file.bb', 'file.bbappend', 'file.bbclass', 'build/conf/local.conf', 'meta/conf/layer.conf', 'build/conf/bbappend.conf', 'meta-layer/conf/distro/foo.conf'],
     blade: ['file.blade.php'],
     blank: ['file.bl'],
index ffbc13eecac96ba3d35550232b18d5fe042a282d..359605b8c292782d4ec8dcfa135b4cec74ae5501 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    536,
 /**/
     535,
 /**/