mirror of
https://github.com/vim/vim.git
synced 2025-11-12 22:44:34 -05:00
patch 9.1.1909: filetype: .mom files recognized as nroff files
Problem: filetype: .mom files recognized as nroff files
Solution: Detect *.mom files as groff filetype instead
(Callum Andrew)
Reference:
- mom macros are written specifically for groff:
https://www.schaffter.ca/mom/
closes: #18718
Signed-off-by: Callum Andrew <dev@candrew.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
e9d296e52a
commit
23e12c0b7e
@@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types
|
" Vim support file to detect file types
|
||||||
"
|
"
|
||||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||||
" Last Change: 2025 Oct 09
|
" Last Change: 2025 Nov 11
|
||||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
|
|
||||||
" If the filetype can be detected from extension or file name(the final path component),
|
" If the filetype can be detected from extension or file name(the final path component),
|
||||||
@@ -774,12 +774,13 @@ au BufNewFile,BufRead */neofetch/config.conf setf sh
|
|||||||
" Nginx
|
" Nginx
|
||||||
au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/nginx/*.conf setf nginx
|
au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/nginx/*.conf setf nginx
|
||||||
|
|
||||||
" Nroff/Troff (*.ms and *.t are checked below)
|
" Nroff/Groff/Troff (*.ms and *.t are checked below)
|
||||||
au BufNewFile,BufRead *.me
|
au BufNewFile,BufRead *.me
|
||||||
\ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" |
|
\ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" |
|
||||||
\ setf nroff |
|
\ setf nroff |
|
||||||
\ endif
|
\ endif
|
||||||
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
|
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac setf nroff
|
||||||
|
au BufNewFile,BufRead *.groff,*.mom setf groff
|
||||||
au BufNewFile,BufRead *.[0-9],*.[013]p,*.[1-8]x,*.3{am,perl,pm,posix,type},*.n call dist#ft#FTnroff()
|
au BufNewFile,BufRead *.[0-9],*.[013]p,*.[1-8]x,*.3{am,perl,pm,posix,type},*.n call dist#ft#FTnroff()
|
||||||
|
|
||||||
" Nroff or Objective C++
|
" Nroff or Objective C++
|
||||||
|
|||||||
@@ -343,6 +343,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
|||||||
grads: ['file.gs'],
|
grads: ['file.gs'],
|
||||||
graphql: ['file.graphql', 'file.graphqls', 'file.gql'],
|
graphql: ['file.graphql', 'file.graphqls', 'file.gql'],
|
||||||
gretl: ['file.gretl'],
|
gretl: ['file.gretl'],
|
||||||
|
groff: ['file.groff', 'file.mom'],
|
||||||
groovy: ['file.gradle', 'file.groovy', 'Jenkinsfile'],
|
groovy: ['file.gradle', 'file.groovy', 'Jenkinsfile'],
|
||||||
group: ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak', '/etc/group', '/etc/group-', '/etc/group.edit', '/etc/gshadow', '/etc/gshadow-', '/etc/gshadow.edit', '/var/backups/group.bak', '/var/backups/gshadow.bak'],
|
group: ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak', '/etc/group', '/etc/group-', '/etc/group.edit', '/etc/gshadow', '/etc/gshadow-', '/etc/gshadow.edit', '/var/backups/group.bak', '/var/backups/gshadow.bak'],
|
||||||
grub: ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'],
|
grub: ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'],
|
||||||
@@ -576,7 +577,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
|||||||
nix: ['file.nix'],
|
nix: ['file.nix'],
|
||||||
norg: ['file.norg'],
|
norg: ['file.norg'],
|
||||||
nqc: ['file.nqc'],
|
nqc: ['file.nqc'],
|
||||||
nroff: ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],
|
nroff: ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'tmac.file'],
|
||||||
nsis: ['file.nsi', 'file.nsh'],
|
nsis: ['file.nsi', 'file.nsh'],
|
||||||
ntriples: ['file.nt'],
|
ntriples: ['file.nt'],
|
||||||
nu: ['file.nu'],
|
nu: ['file.nu'],
|
||||||
|
|||||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1909,
|
||||||
/**/
|
/**/
|
||||||
1908,
|
1908,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user