Mercurial > vim
changeset 24299:201239ff51d7 v8.2.2690
patch 8.2.2690: PowerShell files are not recognized
Commit: https://github.com/vim/vim/commit/ef38bcf05196ad7e795dd77b4922fa9db58fc310
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 2 13:00:15 2021 +0200
patch 8.2.2690: PowerShell files are not recognized
Problem: PowerShell files are not recognized.
Solution: Recognize several PowerShell extension. (Heath Stewart,
closes #8051)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 02 Apr 2021 13:15:03 +0200 |
parents | 598dc2294a47 |
children | 8ed6e57cc3bd |
files | runtime/filetype.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1279,6 +1279,11 @@ au BufNewFile,BufRead .povrayrc setf p " Povray, Pascal, PHP or assembly au BufNewFile,BufRead *.inc call dist#ft#FTinc() +" PowerShell +au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1 +au BufNewFile,BufRead *.ps1xml setf ps1xml +au BufNewFile,BufRead *.cdxml,*.psc1 setf xml + " Printcap and Termcap au BufNewFile,BufRead *printcap \ let b:ptcap_type = "print" | setf ptcap
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -387,6 +387,8 @@ let s:filename_checks = { \ 'promela': ['file.pml'], \ 'proto': ['file.proto'], \ 'protocols': ['/etc/protocols', 'any/etc/protocols'], + \ 'ps1': ['file.ps1', 'file.psd1', 'file.psm1', 'file.pssc'], + \ 'ps1xml': ['file.ps1xml'], \ 'psf': ['file.psf'], \ 'puppet': ['file.pp'], \ 'pyrex': ['file.pyx', 'file.pxd'], @@ -538,7 +540,7 @@ let s:filename_checks = { \ 'xhtml': ['file.xhtml', 'file.xht'], \ 'xinetd': ['/etc/xinetd.conf', '/etc/xinetd.d/file', 'any/etc/xinetd.conf', 'any/etc/xinetd.d/file'], \ 'xmath': ['file.msc', 'file.msf'], - \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss'], + \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1'], \ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'], \ 'xf86conf': ['xorg.conf', 'xorg.conf-4'], \ 'xpm2': ['file.xpm2'],