summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-02 13:00:15 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-02 13:00:15 +0200
commitef38bcf05196ad7e795dd77b4922fa9db58fc310 (patch)
tree7b28768034bebc4d90ea5b4b47d14ee432df99c1
parent160a2b4dac198f31fbcff9d696548e011c4602c1 (diff)
downloadvim-git-ef38bcf05196ad7e795dd77b4922fa9db58fc310.tar.gz
patch 8.2.2690: PowerShell files are not recognizedv8.2.2690
Problem: PowerShell files are not recognized. Solution: Recognize several PowerShell extension. (Heath Stewart, closes #8051)
-rw-r--r--runtime/filetype.vim5
-rw-r--r--src/testdir/test_filetype.vim4
-rw-r--r--src/version.c2
3 files changed, 10 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index c34b63b61..f85ac81d3 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1279,6 +1279,11 @@ au BufNewFile,BufRead .povrayrc setf povini
" 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
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 05ea8e397..207648f61 100644
--- 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'],
diff --git a/src/version.c b/src/version.c
index 743fbfb0d..7e446dc42 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2690,
+/**/
2689,
/**/
2688,