Merge #10678 from janlazo/vim-8.1.1187

vim-patch:8.1.{1187,1761,1762,1775}
This commit is contained in:
Justin M. Keyes
2019-08-03 13:59:41 +02:00
committed by GitHub
2 changed files with 24 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types " Vim support file to detect file types
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 May 06 " Last Change: 2019 Jul 27
" Listen very carefully, I will say this only once " Listen very carefully, I will say this only once
if exists("did_load_filetypes") if exists("did_load_filetypes")
@@ -703,9 +703,6 @@ au BufNewFile,BufRead *.t.html setf tilde
" HTML (.shtml and .stm for server side) " HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
" Vue.js Single File Component
au BufNewFile,BufRead *.vue setf vuejs
" HTML with Ruby - eRuby " HTML with Ruby - eRuby
au BufNewFile,BufRead *.erb,*.rhtml setf eruby au BufNewFile,BufRead *.erb,*.rhtml setf eruby
@@ -1173,6 +1170,10 @@ au BufNewFile,BufRead *.rcp setf pilrc
" Pine config " Pine config
au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine
" Pipenv Pipfiles
au BufNewFile,BufRead Pipfile setf config
au BufNewFile,BufRead Pipfile.lock setf json
" PL/1, PL/I " PL/1, PL/I
au BufNewFile,BufRead *.pli,*.pl1 setf pli au BufNewFile,BufRead *.pli,*.pl1 setf pli
@@ -1774,12 +1775,15 @@ au BufNewFile,BufRead *.wrl setf vrml
" Vroom (vim testing and executable documentation) " Vroom (vim testing and executable documentation)
au BufNewFile,BufRead *.vroom setf vroom au BufNewFile,BufRead *.vroom setf vroom
" Webmacro " Vue.js Single File Component
au BufNewFile,BufRead *.wm setf webmacro au BufNewFile,BufRead *.vue setf vue
" WebAssembly " WebAssembly
au BufNewFile,BufRead *.wast,*.wat setf wast au BufNewFile,BufRead *.wast,*.wat setf wast
" Webmacro
au BufNewFile,BufRead *.wm setf webmacro
" Wget config " Wget config
au BufNewFile,BufRead .wgetrc,wgetrc setf wget au BufNewFile,BufRead .wgetrc,wgetrc setf wget
@@ -1865,7 +1869,8 @@ au BufNewFile,BufRead *.xmi setf xml
au BufNewFile,BufRead *.csproj,*.csproj.user setf xml au BufNewFile,BufRead *.csproj,*.csproj.user setf xml
" Qt Linguist translation source and Qt User Interface Files are XML " Qt Linguist translation source and Qt User Interface Files are XML
au BufNewFile,BufRead *.ts,*.ui setf xml " However, for .ts Typescript is more common.
au BufNewFile,BufRead *.ui setf xml
" TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull) " TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
au BufNewFile,BufRead *.tpm setf xml au BufNewFile,BufRead *.tpm setf xml

View File

@@ -44,8 +44,10 @@ endfunc
" Filetypes detected just from matching the file name. " Filetypes detected just from matching the file name.
let s:filename_checks = { let s:filename_checks = {
\ '8th': ['file.8th'],
\ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc'], \ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc'],
\ 'a65': ['file.a65'], \ 'a65': ['file.a65'],
\ 'aap': ['file.aap'],
\ 'abap': ['file.abap'], \ 'abap': ['file.abap'],
\ 'abc': ['file.abc'], \ 'abc': ['file.abc'],
\ 'abel': ['file.abl'], \ 'abel': ['file.abl'],
@@ -56,7 +58,8 @@ let s:filename_checks = {
\ 'aml': ['file.aml'], \ 'aml': ['file.aml'],
\ 'ampl': ['file.run'], \ 'ampl': ['file.run'],
\ 'ant': ['build.xml'], \ 'ant': ['build.xml'],
\ 'apache': ['.htaccess', '/etc/httpd/file.conf'], \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config'],
\ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file'],
\ 'applescript': ['file.scpt'], \ 'applescript': ['file.scpt'],
\ 'aptconf': ['apt.conf', '/.aptitude/config'], \ 'aptconf': ['apt.conf', '/.aptitude/config'],
\ 'arch': ['.arch-inventory'], \ 'arch': ['.arch-inventory'],
@@ -81,7 +84,7 @@ let s:filename_checks = {
\ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c'], \ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c'],
\ 'cabal': ['file.cabal'], \ 'cabal': ['file.cabal'],
\ 'calendar': ['calendar'], \ 'calendar': ['calendar'],
\ 'catalog': ['catalog'], \ 'catalog': ['catalog', 'sgml.catalogfile'],
\ 'cdl': ['file.cdl'], \ 'cdl': ['file.cdl'],
\ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao'], \ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao'],
\ 'cdrtoc': ['file.toc'], \ 'cdrtoc': ['file.toc'],
@@ -102,7 +105,7 @@ let s:filename_checks = {
\ 'coco': ['file.atg'], \ 'coco': ['file.atg'],
\ 'conaryrecipe': ['file.recipe'], \ 'conaryrecipe': ['file.recipe'],
\ 'conf': ['auto.master'], \ 'conf': ['auto.master'],
\ 'config': ['configure.in', 'configure.ac'], \ 'config': ['configure.in', 'configure.ac', 'Pipfile'],
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi'], \ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi'],
\ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'], \ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
\ 'crm': ['file.crm'], \ 'crm': ['file.crm'],
@@ -223,7 +226,7 @@ let s:filename_checks = {
\ 'jgraph': ['file.jgr'], \ 'jgraph': ['file.jgr'],
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'], \ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx'], \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx'],
\ 'json': ['file.json', 'file.jsonp', 'file.webmanifest'], \ 'json': ['file.json', 'file.jsonp', 'file.webmanifest', 'Pipfile.lock'],
\ 'jsp': ['file.jsp'], \ 'jsp': ['file.jsp'],
\ 'kconfig': ['Kconfig', 'Kconfig.debug'], \ 'kconfig': ['Kconfig', 'Kconfig.debug'],
\ 'kivy': ['file.kv'], \ 'kivy': ['file.kv'],
@@ -424,7 +427,7 @@ let s:filename_checks = {
\ 'svg': ['file.svg'], \ 'svg': ['file.svg'],
\ 'svn': ['svn-commitfile.tmp'], \ 'svn': ['svn-commitfile.tmp'],
\ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf'], \ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf'],
\ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.mount', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer'], \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.mount', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file'],
\ 'systemverilog': ['file.sv', 'file.svh'], \ 'systemverilog': ['file.sv', 'file.svh'],
\ 'tags': ['tags'], \ 'tags': ['tags'],
\ 'tak': ['file.tak'], \ 'tak': ['file.tak'],
@@ -467,13 +470,14 @@ let s:filename_checks = {
\ 'verilog': ['file.v'], \ 'verilog': ['file.v'],
\ 'verilogams': ['file.va', 'file.vams'], \ 'verilogams': ['file.va', 'file.vams'],
\ 'vgrindefs': ['vgrindefs'], \ 'vgrindefs': ['vgrindefs'],
\ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst'], \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123'],
\ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc'], \ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc'],
\ 'viminfo': ['.viminfo', '_viminfo'], \ 'viminfo': ['.viminfo', '_viminfo'],
\ 'vmasm': ['file.mar'], \ 'vmasm': ['file.mar'],
\ 'voscm': ['file.cm'], \ 'voscm': ['file.cm'],
\ 'vrml': ['file.wrl'], \ 'vrml': ['file.wrl'],
\ 'vroom': ['file.vroom'], \ 'vroom': ['file.vroom'],
\ 'vue': ['file.vue'],
\ 'wast': ['file.wast', 'file.wat'], \ 'wast': ['file.wast', 'file.wat'],
\ 'webmacro': ['file.wm'], \ 'webmacro': ['file.wm'],
\ 'wget': ['.wgetrc', 'wgetrc'], \ 'wget': ['.wgetrc', 'wgetrc'],
@@ -501,7 +505,6 @@ let s:filename_checks = {
\ 'zimbutempl': ['file.zut'], \ 'zimbutempl': ['file.zut'],
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh'], \ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh'],
\ \
\ 'aap': ['file.aap'],
\ 'help': [$VIMRUNTIME . '/doc/help.txt'], \ 'help': [$VIMRUNTIME . '/doc/help.txt'],
\ 'xpm': ['file.xpm'], \ 'xpm': ['file.xpm'],
\ } \ }
@@ -515,9 +518,9 @@ func CheckItems(checks)
for i in range(0, len(names) - 1) for i in range(0, len(names) - 1)
new new
try try
exe 'edit ' . names[i] exe 'edit ' . fnameescape(names[i])
catch catch
call assert_report('cannot edit "' . names[i] . '": ' . v:errmsg) call assert_report('cannot edit "' . names[i] . '": ' . v:exception)
endtry endtry
call assert_equal(ft, &filetype, 'with file name: ' . names[i]) call assert_equal(ft, &filetype, 'with file name: ' . names[i])
bwipe! bwipe!