]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1045: filetype: N-Tripels and TriG files are not recognized v9.1.1045
authorGordian Dziwis <gordian@dziw.is>
Tue, 21 Jan 2025 21:24:23 +0000 (22:24 +0100)
committerChristian Brabandt <cb@256bit.org>
Tue, 21 Jan 2025 21:24:23 +0000 (22:24 +0100)
Problem:  filetype: N-Tripels and TriG files are not recognized
Solution: detect '*.nt' files as ntriples filetype and '*.trig' files
          as trig filetype (Gordian Dziwis)

closes: #16493

Signed-off-by: Gordian Dziwis <gordian@dziw.is>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 6b323bd8230e7ca2ba80288925a6402878911330..d2ff662269407733f44f6411d20f9543d9987e90 100644 (file)
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:  The Vim Project <https://github.com/vim/vim>
-" Last Change: 2025 Jan 20
+" Last Change: 2025 Jan 21
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 " Listen very carefully, I will say this only once
@@ -1727,6 +1727,9 @@ au BufNewFile,BufRead *.nse                       setf lua
 " NSIS
 au BufNewFile,BufRead *.nsi,*.nsh              setf nsis
 
+" N-Triples
+au BufNewFile,BufRead *.nt                     setf ntriples
+
 " Nu
 au BufNewFile,BufRead *.nu             setf nu
 
@@ -2323,6 +2326,9 @@ au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login       call dist#ft#SetFile
 " (patterns ending in a start further below)
 au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias  call dist#ft#CSH()
 
+" TriG
+au BufNewFile,BufRead *.trig                   setf trig
+
 " Zig and Zig Object Notation (ZON)
 au BufNewFile,BufRead *.zig,*.zon              setf zig
 
index 9faa272a1a14ee1964929d2d1d8553aef649c0b6..e5411af154f9cd54073d28e25e25280d7c635a2f 100644 (file)
@@ -552,6 +552,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     nqc: ['file.nqc'],
     nroff: ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],
     nsis: ['file.nsi', 'file.nsh'],
+    ntriples: ['file.nt'],
     nu: ['file.nu'],
     obj: ['file.obj'],
     objdump: ['file.objdump', 'file.cppobjdump'],
@@ -817,6 +818,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     tpp: ['file.tpp'],
     trace32: ['file.cmm', 'file.t32'],
     treetop: ['file.treetop'],
+    trig: ['file.trig'],
     trustees: ['trustees.conf'],
     tsalt: ['file.slt'],
     tsscl: ['file.tsscl'],
index ad451d70a68d74a52a107eaca0c51d918172c382..fb5fd376e6e1ccec9c5c54837243b0d98c34b5d0 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1045,
 /**/
     1044,
 /**/