xref: /vim-8.2.3635/runtime/ftplugin/ps1xml.vim (revision 130cbfc3)
1" Vim filetype plugin file
2" Language:    Windows PowerShell
3" URL:         https://github.com/PProvost/vim-ps1
4" Last Change: 2021 Apr 02
5
6" Only do this when not done yet for this buffer
7if exists("b:did_ftplugin") | finish | endif
8
9" Don't load another plug-in for this buffer
10let b:did_ftplugin = 1
11
12let s:cpo_save = &cpo
13set cpo&vim
14
15setlocal tw=0
16setlocal commentstring=#%s
17setlocal formatoptions=tcqro
18
19" Change the browse dialog on Win32 to show mainly PowerShell-related files
20if has("gui_win32")
21  let b:browsefilter =
22        \ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
23        \ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
24        \ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
25        \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
26        \ "All Files (*.*)\t*.*\n"
27endif
28
29" Undo the stuff we changed
30let b:undo_ftplugin = "setlocal tw< cms< fo<" .
31      \ " | unlet! b:browsefilter"
32
33let &cpo = s:cpo_save
34unlet s:cpo_save
35