blob: 3eb89a4c2429f06726600b72cc9d12ddb34b86a0 [file] [log] [blame]
Bram Moolenaar4d8f4762021-06-27 15:18:56 +02001*ft_ps1.txt* A Windows PowerShell syntax plugin for Vim
Bram Moolenaar130cbfc2021-04-07 21:07:20 +02002
3Author: Peter Provost <https://www.github.com/PProvost>
4License: Apache 2.0
5URL: https://github.com/PProvost/vim-ps1
6
7INTRODUCTION *ps1-syntax*
8
9This plugin provides Vim syntax, indent and filetype detection for Windows
10PowerShell scripts, modules, and XML configuration files.
11
12
13ABOUT *ps1-about*
14
15Grab the latest version or report a bug on GitHub:
16
17https://github.com/PProvost/vim-ps1
18
19
20FOLDING *ps1-folding*
21
22The ps1 syntax file provides syntax folding (see |:syn-fold|) for script blocks
23and digital signatures in scripts.
24
25When 'foldmethod' is set to "syntax" then function script blocks will be
26folded unless you use the following in your .vimrc or before opening a script: >
27
28 :let g:ps1_nofold_blocks = 1
29<
30Digital signatures in scripts will also be folded unless you use: >
31
32 :let g:ps1_nofold_sig = 1
33<
34Note: syntax folding might slow down syntax highlighting significantly,
35especially for large files.
36
37
38COMPILER *ps1-compiler*
39
40The powershell `:compiler` script configures |:make| to execute the script in
41PowerShell.
42
43It tries to pick a smart default PowerShell command: `pwsh` if available and
44`powershell` otherwise, but you can customize the command: >
45
46 :let g:ps1_makeprg_cmd = '/path/to/pwsh'
47<
48To configure whether to show the exception type information: >
49
50 :let g:ps1_efm_show_error_categories = 1
51<
52
53KEYWORD LOOKUP *ps1-keyword*
54
55To look up keywords using PowerShell's Get-Help, press the |K| key. For more
56convenient paging, the pager `less` should be installed, which is included in
57many Linux distributions and in macOS.
58
59Many other distributions are available for Windows like
60https://chocolatey.org/packages/less/. Make sure `less` is in a directory
61listed in the `PATH` environment variable, which chocolatey above does.
62
63------------------------------------------------------------------------------
64 vim:ft=help: