forked from aniani/vim
patch 8.2.4778: pacman files use dosini filetype
Problem: Pacman files use dosini filetype. Solution: Use conf instead. (Chaoren Lin, closes #10213)
This commit is contained in:
committed by
Bram Moolenaar
parent
366f0bdd08
commit
35cff32dd8
@@ -1287,13 +1287,13 @@ au BufNewFile,BufRead *.org,*.org_archive setf org
|
||||
" Packet filter conf
|
||||
au BufNewFile,BufRead pf.conf setf pf
|
||||
|
||||
" Pacman Config (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/pacman.conf setf dosini
|
||||
" Pacman config
|
||||
au BufNewFile,BufRead */etc/pacman.conf setf conf
|
||||
|
||||
" Pacman hooks
|
||||
au BufNewFile,BufRead *.hook
|
||||
\ if getline(1) == '[Trigger]' |
|
||||
\ setf dosini |
|
||||
\ setf conf |
|
||||
\ endif
|
||||
|
||||
" Pam conf
|
||||
|
@@ -113,7 +113,7 @@ let s:filename_checks = {
|
||||
\ 'cobol': ['file.cbl', 'file.cob', 'file.lib'],
|
||||
\ 'coco': ['file.atg'],
|
||||
\ 'conaryrecipe': ['file.recipe'],
|
||||
\ 'conf': ['auto.master'],
|
||||
\ 'conf': ['/etc/pacman.conf', 'any/etc/pacman.conf', 'auto.master'],
|
||||
\ 'config': ['configure.in', 'configure.ac', '/etc/hostname.file'],
|
||||
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
|
||||
\ 'cook': ['file.cook'],
|
||||
@@ -152,7 +152,7 @@ let s:filename_checks = {
|
||||
\ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
|
||||
\ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile', 'Dockerfile.debian', 'Containerfile.something'],
|
||||
\ 'dosbatch': ['file.bat'],
|
||||
\ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/pacman.conf', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'],
|
||||
\ 'dosini': ['.editorconfig', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'],
|
||||
\ 'dot': ['file.dot', 'file.gv'],
|
||||
\ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
|
||||
\ 'dtd': ['file.dtd'],
|
||||
@@ -1199,12 +1199,12 @@ func Test_hook_file()
|
||||
|
||||
call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook')
|
||||
split Xfile.hook
|
||||
call assert_equal('dosini', &filetype)
|
||||
call assert_equal('conf', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['not pacman'], 'Xfile.hook')
|
||||
split Xfile.hook
|
||||
call assert_notequal('dosini', &filetype)
|
||||
call assert_notequal('conf', &filetype)
|
||||
bwipe!
|
||||
|
||||
call delete('Xfile.hook')
|
||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4778,
|
||||
/**/
|
||||
4777,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user