Skip to content

Commit 3a4c53b

Browse files
committed
patch 8.1.1187: cannot recognize Pipfile
Problem: Cannot recognize Pipfile. Solution: Use existing filetypes. (Charles Ross, closes #4280)
1 parent 334ad41 commit 3a4c53b

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

runtime/filetype.vim

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim support file to detect file types
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last Change: 2019 Mar 26
4+
" Last Change: 2019 Apr 19
55

66
" Listen very carefully, I will say this only once
77
if exists("did_load_filetypes")
@@ -1174,6 +1174,10 @@ au BufNewFile,BufRead *.rcp setf pilrc
11741174
" Pine config
11751175
au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine
11761176

1177+
" Pipenv Pipfiles
1178+
au BufNewFile,BufRead Pipfile setf config
1179+
au BufNewFile,BufRead Pipfile.lock setf json
1180+
11771181
" PL/1, PL/I
11781182
au BufNewFile,BufRead *.pli,*.pl1 setf pli
11791183

@@ -1863,7 +1867,8 @@ au BufNewFile,BufRead *.xmi setf xml
18631867
au BufNewFile,BufRead *.csproj,*.csproj.user setf xml
18641868

18651869
" Qt Linguist translation source and Qt User Interface Files are XML
1866-
au BufNewFile,BufRead *.ts,*.ui setf xml
1870+
" However, for .ts Typescript is more common.
1871+
au BufNewFile,BufRead *.ui setf xml
18671872

18681873
" TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
18691874
au BufNewFile,BufRead *.tpm setf xml

src/testdir/test_filetype.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ let s:filename_checks = {
102102
\ 'coco': ['file.atg'],
103103
\ 'conaryrecipe': ['file.recipe'],
104104
\ 'conf': ['auto.master'],
105-
\ 'config': ['configure.in', 'configure.ac'],
105+
\ 'config': ['configure.in', 'configure.ac', 'Pipfile'],
106106
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi'],
107107
\ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
108108
\ 'crm': ['file.crm'],
@@ -223,7 +223,7 @@ let s:filename_checks = {
223223
\ 'jgraph': ['file.jgr'],
224224
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
225225
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx'],
226-
\ 'json': ['file.json', 'file.jsonp', 'file.webmanifest'],
226+
\ 'json': ['file.json', 'file.jsonp', 'file.webmanifest', 'Pipfile.lock'],
227227
\ 'jsp': ['file.jsp'],
228228
\ 'kconfig': ['Kconfig', 'Kconfig.debug'],
229229
\ 'kivy': ['file.kv'],

src/version.c

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

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1187,
774776
/**/
775777
1186,
776778
/**/

0 commit comments

Comments
 (0)