Skip to content

Commit a7a9a47

Browse files
Shane-XB-Qianchrisbra
authored andcommitted
patch 9.1.0322: filetype: some mail tools not recognized
Problem: filetype: some mail tools not recognized Solution: Detect '.mbsncrc' as conf, '.msmtprc' as msmtp and '.notmuch-config' as ini filetype (Shane-XB-Qian) closes: #14533 Signed-off-by: shane.xb.qian <shane.qian@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 49528da commit a7a9a47

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

runtime/filetype.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,9 @@ au BufNewFile,BufRead *.nb setf mma
13961396
" Maya Extension Language
13971397
au BufNewFile,BufRead *.mel setf mel
13981398

1399+
" mbsync
1400+
au BufNewFile,BufRead .mbsyncrc setf conf
1401+
13991402
" Mercurial (hg) commit file
14001403
au BufNewFile,BufRead hg-editor-*.txt setf hgcommit
14011404

@@ -1428,6 +1431,9 @@ au BufNewFile,BufRead *.mix,*.mixal setf mix
14281431
" MMIX or VMS makefile
14291432
au BufNewFile,BufRead *.mms call dist#ft#FTmms()
14301433

1434+
" msmtp
1435+
au BufNewFile,BufRead .msmtprc setf msmtp
1436+
14311437
" Symbian meta-makefile definition (MMP)
14321438
au BufNewFile,BufRead *.mmp setf mmp
14331439

@@ -1555,6 +1561,9 @@ au BufNewFile,BufRead *.mm call dist#ft#FTmm()
15551561
" Not Quite C
15561562
au BufNewFile,BufRead *.nqc setf nqc
15571563

1564+
" notmuch
1565+
au BufNewFile,BufRead .notmuch-config setf dosini
1566+
15581567
" NSE - Nmap Script Engine - uses Lua syntax
15591568
au BufNewFile,BufRead *.nse setf lua
15601569

@@ -3117,3 +3126,5 @@ endfunc
31173126
" Restore 'cpoptions'
31183127
let &cpo = s:cpo_save
31193128
unlet s:cpo_save
3129+
3130+
" vim: ts=8

src/testdir/test_filetype.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def s:GetFilenameChecks(): dict<list<string>>
162162
cobol: ['file.cbl', 'file.cob', 'file.lib'],
163163
coco: ['file.atg'],
164164
conaryrecipe: ['file.recipe'],
165-
conf: ['auto.master', 'file.conf', 'texdoc.cnf', '.x11vncrc', '.chktexrc', '.ripgreprc', 'ripgreprc', 'file.ctags'],
165+
conf: ['auto.master', 'file.conf', 'texdoc.cnf', '.x11vncrc', '.chktexrc', '.ripgreprc', 'ripgreprc', 'file.ctags', '.mbsyncrc'],
166166
config: ['configure.in', 'configure.ac', '/etc/hostname.file', 'any/etc/hostname.file'],
167167
confini: ['pacman.conf', 'paru.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection'],
168168
context: ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
@@ -219,7 +219,7 @@ def s:GetFilenameChecks(): dict<list<string>>
219219
'.coveragerc', '.pypirc', '.gitlint', '.oelint.cfg', 'pylintrc', '.pylintrc',
220220
'/home/user/.config/bpython/config', '/home/user/.config/mypy/config', '.wakatime.cfg', '.replyrc',
221221
'psprint.conf', 'sofficerc', 'any/.config/lxqt/globalkeyshortcuts.conf', 'any/.config/screengrab/screengrab.conf',
222-
'any/.local/share/flatpak/repo/config'],
222+
'any/.local/share/flatpak/repo/config', '.notmuch-config'],
223223
dot: ['file.dot', 'file.gv'],
224224
dracula: ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
225225
dtd: ['file.dtd'],
@@ -476,6 +476,7 @@ def s:GetFilenameChecks(): dict<list<string>>
476476
msidl: ['file.odl', 'file.mof'],
477477
msql: ['file.msql'],
478478
mojo: ['file.mojo', 'file.🔥'],
479+
msmtp: ['.msmtprc'],
479480
mupad: ['file.mu'],
480481
mush: ['file.mush'],
481482
mustache: ['file.mustache'],

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
322,
707709
/**/
708710
321,
709711
/**/

0 commit comments

Comments
 (0)